Unicode, UTF-8 and MSIE5.2 (Mac)
By Oli
At 9:41 AM · Wednesday, 5 March · 2003
To Coding · Japan
Why does using Unicode have to be so hard?
I’m trying to use Unicode to make Japanese/English files. However I found that how I save the file makes a big difference to how they’re displayed on my three test browsers (Chimera 0.6, Safari beta and MSIE 5.2, all for Mac). If I save a mixed Japanese/English text file as charset=utf-8 with lang=ja but save it as a normal file, all three browsers display the layout and English text fine, but display mojibake (garbled text) for the Japanese (unless the default browser character set is Shift-JIS, which only happens if you’re using a Japanese OS => Japanese). Saving as a Unicode file will help right? For Chimera and Safari a standard Unicode file (including a Byte Order Mark) works fine, but for MSIE 5.5 it displays the HTML code (!). If I then save the file as Unicode plus UTF-8 encoding, the text (including Japanese) displays fine on all browsers, but Safari inserts about 10px at the top of the page, and MSIE 5.2 puts in a Euro symbol (€). The extra space (and MSIE’s Euro) are both inserted above the first content tag, even though there is no white space between the body tag and the first div. Huh? Seems like a loose-loose situation when using Unicode, with extra space and a possible Euro symbol as the least bad of three bad choices. Suck. I’d be interested to hear about results on other browsers (especially PC/older ones)