Inspired? No home

Default encoding in IE7 changed to UTF-8

Earlier versions of IE set character encoding according to the language on the client when the document did not specify encoding. So at my computer with a Norwegian version of Microsoft Windows, documents without character encoding was parsed with ISO-8859-1 encoding.

But in IE7 this seems to have changed, at least in the current beta; the default character encoding is UTF-8. Now this can cause a major problem if you are not specifying a character encoding in the documents served to the client and at the same time using special characters such as Norwegian characters (ISO-8859-1). So on my test computer with IE7 installed all Norwegian characters show up scrambled because IE7 parse the content as unicode.

Solution: either specify character encoding according to the language used or use unicode in your pages (and make sure to specify UTF-8 as encoding as well).

And as final note it should be said that unicode is preferred regardless of the issue discussed here.


Written on 20 July 2006.
blog comments powered by Disqus