Google Blogoscoped

Forum

chinese characters in web pages

dave [PersonRank 0]

Monday, February 25, 2008
12 years ago2,151 views

Blogoscoped often has articles that mix chinese and english. does anyone have any good advice/web pages to point to articles about doing this successfully, so as not to get square blocks or errors for some users?

Philipp Lenssen [PersonRank 10]

12 years ago #

Basically what your page or blogging tool needs is UTF-8 character encoding. (Sometimes, you may run into troubles because not all software supports this.) Given UTF-8, some users may still not have the necessary Chinese fonts installed, though, so it's no definite way to avoid all kinds of square block characters (on Windows you can install it later on though). So I think you need to look into keywords like "unicode" or "utf-8" and then it depends on what software you are using or what specific character issue you may have... there's actually a lot of potential troubles in this area, depending on the software...

dave [PersonRank 0]

12 years ago #

Hi – thanks for the response. I'm not sure what you mean by software in this case – I'm hand coding, but using asp. or do you mean browser software?

Philipp Lenssen [PersonRank 10]

12 years ago #

Well, all kinds of software run into problems with Unicode, like for instance:
- Some older MySQL distributions (including the one installed on my server, even though the problem is fixed in the newer version I'm running locally...)
- Some programming languages or programming libraries, e.g. PHP's XML parser runs into problems with UTF-8 screenscraping at times
- Some operating systems if not all fonts are installed...
- and so on

Not to say you shouldn't use UTF-8, quite the opposite, you should, and best from the very beginning. It's just that it's something not always working as natively & troublefree as it should.

In ASP, check how you can send the HTTP header. Writing <% response.Charset = "UTF-8" %> may be appropriate...

dave [PersonRank 0]

12 years ago #

ok many thanks

This thread is locked as it's old... but you can create a new thread in the forum. 

Forum home

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement

 

This site unofficially covers Google™ and more with some rights reserved. Join our forum!