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

后端 未结 3 456
花落未央
花落未央 2021-01-03 06:54

All the solutions for this issue say to use , which works because it forces the browser t

相关标签:
3条回答
  • 2021-01-03 07:03

    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

    0 讨论(0)
  • 2021-01-03 07:19

    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.

    0 讨论(0)
  • 2021-01-03 07:23

    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.

    0 讨论(0)
提交回复
热议问题