Reputation: 2870
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.
Upvotes: 1
Views: 1013
Reputation: 308041
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).
Upvotes: 2