views:

60

answers:

1

I'm not a bad web developer but it happens that I've never had to support more than English in my web applications. Now it seems that I need to add support for Chinese for some folks in Shanghai. I was thinking, "I guess I'll just change my SQL database fields to nvarchar and I should be almost there."

After doing some research, this is a bigger deal than I thought. The examples I've seen all show changing a meta tag for the web page, but I need to support both English and Chinese characters (not pictures) in the same page. Is this possible without doing something silly like inserting iFrames?

I just need to be pointed in the right direction.

(While we're at it, I don't want to prevent myself from supporting other character sets in the future, so no hard coding, please!)

Thanks so much.

+2  A: 

Use a character set that supports all Unicode characters (I suggest UTF-8, alternatively UTF-16 might be viable if the majority of your test is not in latin script).

Make sure that you specify the encoding correctly (either by setting the correct header in your HTTP response or by providing the correct meta tag in your HTML).

Joachim Sauer
Joel wrote a very good article about this: http://www.joelonsoftware.com/articles/Unicode.html
NomeN
How could I forget to post that link! It's the best introduction into the topic I know (it's missing some details, but it's just an intro after all).
Joachim Sauer