Internet Explorer uses the wrong character set when it renders an HTML page

Article translations Article translations
Article ID: 928847 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

When Microsoft Internet Explorer renders an HTML page, it may use the wrong character set. Internet Explorer may do this even though the correct character set is specified by a META tag in the HTML page.

For example, Internet Explorer may render a Japanese HTML page by using the Shift-JIS character set even when UTF-8 is specified by the following META tag in the HTML page:
<META http-equiv=Content-Type content="text/html; charset=utf-8">

CAUSE

This issue may occur if one or more or the following conditions are true:
  • The Auto-Select setting is enabled in Internet Explorer. This setting helps Internet Explorer determine the codepage that is used for the HTML page.
  • The System Locale setting differs from the character set that is specified in the META tag.
  • The META tag that specifies the character set is not in the first chunk of HTML data that is parsed by MSHTML. Typically, this means that the tag is located somewhere after the first 256 bytes of data on through the remainder of the first 4 KB of data.
  • The server is a slow system, or the server breaks the first part of the HTTP response so that the response does not contain the META tag. This issue may occur if you enable chunked encoding.
  • When Internet Explorer passes the initial chunk to be parsed to the IMultiLanguage::ConvertStringToUnicode method, Internet Explorer cannot perform the conversion.
Note There are additional conditions that may contribute to this issue. These additional conditions are very code-specific and are not listed here.

RESOLUTION

To resolve this issue, use one of the following methods:
  • Disable the Auto-Select setting in Internet Explorer.
  • Provide the character set in the HTTP headers.
  • Move the META tag to within the first kilobyte of data that is parsed by MSHTML. Although we do not know how much data the parser reads at a time, this location will resolve the issue.
  • Increase the size of the server's initial HTTP response. The initial size should be at least 1 KB.
  • Make sure that the System Locale setting matches the character set of the META tag that is specified in the HTML page.

Properties

Article ID: 928847 - Last Review: October 27, 2007 - Revision: 1.2
APPLIES TO
  • Microsoft Internet Explorer 6.0
  • Windows Internet Explorer 7
Keywords: 
kbtshoot kbprb kbcode kbexpertiseinter KB928847

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com