How can I make Chinese characters show in IE8 without forcing compatibility mode?

房东的猫 提交于 2019-11-30 15:38:34

Setting the following font-family in CSS worked for me:

font-family: Arial Unicode MS, Arial, Helvetica, sans-serif;

Because in this case, Arial Unicode MS is the only available font for Chinese Simplified.

Update: Thanks to Spike, the order of the first two fonts was wrong. Corrected.

it's not an encoding problem. The issue is plainly seen on this page, which has the correct utf-8 meta tag: http://www.jp41.com/internet-explorer/chinese/.

The problem is that IE8's default font for Chinese is set to nothing!

Here's the fix.

  1. Push alt to bring up the file menu.

  2. Go to /tools/internet options/fonts/

  3. Set the "Language Script" to Chinese Simplified

  4. Select the only option - Arial Unicode MS

  5. Accept the changes- problem solved.

This oversight affects Chinese Traditional, Korean, Japanese, and probably most other asian languages.

Image if issue being resolved:
http://www.robertpate.net/blog/wp-content/media/ie8-chinese-bug-fullsize.jpg

This sounds like an encoding problem to me. Chinese characters are probably being output using UTF-8 encoding, but the browser is not being told that and is defaulting to another encoding.

Try including this line:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

That should force the browser into UTF-8 encoding. (This line is included in the site linked in the referenced question: http://www.canadainternational.gc.ca/china-chine/index.aspx?lang=eng, which works fine in my IE8 and defaults to UTF-8.)

Note that the original question states that this is actually a separate issue entirely, involving IE8 relying on installed Windows language packs, while IE7 and earlier did not.


Alternatively as a quick-hack fix, you can just use IE conditionals to only present the meta tag to IE8 browsers.

<!--[if IE 8]>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<![endif]-->

IE7 should ignore this line, causing it to render normally.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!