W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

Re: [XHR] UTF-16 - do content sniffing or not?

From: Hallvord Reiar Michaelsen Steen <hsteen@mozilla.com>
Date: Tue, 24 Mar 2015 11:40:09 +0100
Message-ID: <CAE3JC2xDwF76Bp7UKMqhHojhUnuaZ4Q3uQxeHfKuey743zh5xA@mail.gmail.com>
To: Simon Pieters <simonp@opera.com>
Cc: WebApps WG <public-webapps@w3.org>
> Which MIME type did you use in the response? BOM sniffing in XML is
> non-normative IIRC. For other types, see below.
>

It's text/plain - seems I definitely need one test with an XML response
too.. and one with JSON.


>
> [[
> If charset is null, set charset to utf-8.
>
> Return the result of running decode on byte stream bytes using fallback
> encoding charset.
> ]]
>

Heh, I stopped reading here.. Assuming that "using fallback encoding
charset" would actually decode the data per that charset..


> https://encoding.spec.whatwg.org/#decode
>
> [[
> For each of the rows in the table below, starting with the first one and
> going down, if the first bytes of buffer match all the bytes given in the
> first column, then set encoding to the encoding given in the cell in the
> second column of that row and set BOM seen flag.
> ]]
>
> This step honors the BOM. The fallback encoding is ignored.


That's cool because it means the test is correct as-is. Somewhat less cool
because it means I need to report another bug..
-Hallvord
Received on Tuesday, 24 March 2015 10:40:41 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:26 UTC