W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2009

[whatwg] UTF-16 encoding default

From: L. David Baron <dbaron@dbaron.org>
Date: Fri, 17 Jul 2009 09:13:51 -0700
Message-ID: <20090717161351.GA13106@pickering.dbaron.org>
On Wednesday 2009-07-15 04:24 +0000, Ian Hickson wrote:
> Firefox checks to see if the first two bytes are null/not-null or 
> not-null/null and acts accordingly; if they're both not null it uses BE 
> and if they're both null it does something I don't recognise (and checks 
> both the UTF-8 and UTF-16 character encodings in the menu...).

That's odd.  For what it's worth, the code (the last function in a
file incorrectly named nsUCS2BEToUnicode.cpp) looks like it should
use BE in any case where there was no BOM and we didn't hit the case
where exactly one of the two first bytes was non-null.

(You didn't have any autodetection enabled, did you?)

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Friday, 17 July 2009 09:13:51 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:14 UTC