meta charset really better come before non-ASCII text

We have always told people to put information like
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
as early as possible in the <head> of an HTML document.

Now I ran into a case where that actually mattered: IE just showed
a blank page if a Japanese <title> appeared before the above info.

This may be specific to some version of IE (I'm using
6.0.2900.2180.xpsp_sp2_gdr.05031-1519), or some settings, or due to
the fact that I did this locally, or it may be more general.
The files I used are attached; testie3.html displays well,
testie4.html shows a blank page.

This is in no way a criticism of IE, I think IE is perfectly
okay in not accepting this file. The main reason I'm writing
this is to clearly document this case; a lot of advice we give
is sometimes based on second-hand information.
[if this is common knowledge, I appologize.]

Btw, if you test this and other things, please be aware of
the fact that IE tends to keep information about the encoding
of a page; if you really want to make sure IE doesn't keep
such information from an earlier test, the best thing is to
give the file a new name by copying it.


Regards,    Martin. 

Received on Thursday, 7 July 2005 07:34:46 UTC