Jump to content
iwato

CJK Fonts on Non-CJK Third Party Browser

Recommended Posts

BACKGROUND:  Browsers have come a long way over the years, and it is likely that what I am about to ask may appear silly to many.  However, I was weened on the internet in Japanese while in Japan, and all of my operating systems since 1994 have been fully equipped to handle CJK fonts.  In contrast, in the early years my online readership was nearly always those whose operating systems and browsers were not equipped to handle CJK fonts, and I was forever compelled to find work arounds for the proper display of CJK fonts in non-CJK operating systems.

QUESTION:  Today, what is the best to insert CJK fonts into an all-English web-application so that they will display properly for users no matter the language of their operating system.  For example, is there some way that I can compel a browser to read in UTF-8, or is it even necessary.

CAUTION:  In answering this question please understand that nearly every page of the Grammar Captive website begins with the following <head> element notation:

<!DOCTYPE html>
<html lang="en">

Roddy

Edited by iwato

Share this post


Link to post
Share on other sites

You can certainly produce UTF-8 pages and tell the browser to use UTF-8.  If every character you need is in that character set then that's an option.

Share this post


Link to post
Share on other sites

QUESTION ONE:  So, by simply changing the lang property in the <html> element from "en" to "utf-8" will my goal be achieved?

QUESTION TWO: Can it then be assumed that all modern browsers are capable of handling any character found within the utf-8 character set?

QUESTION THREE:  Is it possible to enter more than one value for the lang property?  Say, lang="en, utf-8"?

Roddy

Share this post


Link to post
Share on other sites
Quote

So, by simply changing the lang property in the <html> element from "en" to "utf-8" will my goal be achieved?

No, utf-8 is not a valid ISO language code, it's not a language at all.  It's a character encoding.  But only telling the browser which character encoding to use is not enough either, you need to actually use that character encoding.  If you have some web page that you saved using a Windows Latin encoding and you're telling the browser that it's UTF-8, things aren't going to be displayed correctly.

 

Quote

Can it then be assumed that all modern browsers are capable of handling any character found within the utf-8 character set?

 

I don't know if I would make the assumption that every modern browser on every platform implements all 1,112,064 valid UTF-8 code points.  You only need to find one browser not implementing one character to make that entire assumption false.  I try to avoid absolute statements like that, especially when they're only assumptions.

 

Quote

Is it possible to enter more than one value for the lang property?  Say, lang="en, utf-8"?

 

According to the MDN documentation, that is not valid.

  • Like 1

Share this post


Link to post
Share on other sites

OK.  That was helpful.  I was, indeed, confusing language with encoding.  By the way, all of my documents are opened and saved with UTF-8.

QUESTION ONE:  So, does the following correspond with a appropriate HTML 5 header, and

QUESTION TWO:  Can it be interpreted to mean:  "This page is encoded with UTF-8 and should be read in UTF-8.  In addition, the primary language used on this page is English."

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8" />
	...
</head>

 

Share this post


Link to post
Share on other sites

Then, everything is cool!

Thanks!

Roddy

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×