Daniel R. Tobias wrote:
> barney wrote:
>> http://www.everywine.co.uk/preston17/brownbros/BBgift.html
>> 
>> When this page is first loaded, it's usually layed out all wrong.  Hit
>> Reload, and the layout fixes itself for the most part, but the
>> stylesheet isn't applied.  I didn't see anything in the source code that
>> might cause this odd rendering, then I looked at the Page Info and
>> Character Encoding UTF-16LE caught my eye.  There isn't any charset
>> coded in the page itself, so I guess this is coming from the server.
> 
> I checked, and there isn't any charset in the server response either; 
> try this HTTP response checker:
> http://www.rexswain.com/httpview.html
> 
> Mozilla seems to be guessing the character encoding from the data 
> itself (which seems to be in a 16-bit encoding, since there are null 
> bytes in between 8-bit characters).  But sometimes it gets out of sync 
> in processing the multibyte characters, and things get messed up. 
> When I try it, the link URLs in the status bar show up in Chinese or 
> something, and sometimes part of the page text also looks Chinese.
> 
> I remember encountering the same effect a few days ago on another 
> page, which was also sent in 16-bit coding but with no charset HTTP 
> header.  That one did have a META tag with a charset header (an 
> inferior way to specify a character set over using true HTTP headers, 
> since it's uncertain whether the browser can even parse the META tags 
> in the first place if it doesn't know what character encoding it's 
> in), but it was an incorrect charset (it said UTF-8).
> 
> Mozilla appears to do some character-set-sniffing of its own, 
> overriding the actually specified charset, but sometimes messes up, I 
> guess.  I don't know if it would still mess up like this if the 
> charset were correctly specified.
> 
> 

Thanks for the detailed explanation.  Now I know what to look for in the
future.  Sounds like it's partly mozilla's fault and partly an
evangelism bug.  If the nulls weren't there, mozilla wouldn't have a
problem with it.  Guess I get on the webmaster's back next. :)


Reply via email to