I have a client that is reporting comments from some survey that they've collected online to their clients. One of these reports has multiple languages, and I'm trying to find some combination of the 'meta http-equiv="Content-Type" content="text/html; charset=??' tag and some kind of function that I would wrap all the text in so that I can show all three on the screen; side-by-side.
Right now, I have the meta charset to ISO-8859-1, and I have the text that's pulled out from the database wrapped in htmlentities(). That seems to display everything properly EXCEPT for the Chinese characters. Check out these screen shots:
http://designchemistry.net/i/improvements_iso_encoding_screen_1.png
http://designchemistry.net/i/improvements_iso_encoding_screen_2.png
If I change the character encoding on the whole page to utf-8, and take out the htmlentities(), MOST of the Chinese characters appear correctly, but then some of the other characters aren't displayed. Looks like most of them are apostrophes (which was probably copied and pasted from Word) and those darn en dashes. And check out what it did to the Spanish characters!
http://designchemistry.net/i/improvements_utf_encoding_screen_1.png
http://designchemistry.net/i/improvements_utf_encoding_screen_2.png
So... I'm sure there is some combination of the page encoding and some kind of code that I can put around the text so that all three languages will appear side-by-side on the screen. It seems like leaving the character encoding at ISO-8859-1 and writing some kind of function that I can place around the text for the Chinese characters would be the path of least resistance here, but that may not be an option. I'm open to any and all suggestions on how I can complete this for our client (and I can learn something new also).
Thanks,
Shaun Worcester | senior webologist
design chemistry, llc | next generation web site design
p. 800 640 0424 x 105 | http://www.designchemistry.com/
Connect to me: http://www.google.com/profiles/shaun.daytonwebheads
Follow us on Twitter: http://twitter.com/daytonwebdesign
Become a fan on Facebook: http://www.facebook.com/daytonwebdesign