W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2012

Re: [whatwg] StringEncoding open issues

From: Anne van Kesteren <annevk@annevk.nl>
Date: Mon, 17 Sep 2012 23:17:19 +0200
Message-ID: <CADnb78gWt2iD=GmQVh-6g=p7Ffn8F3HHd2Zrdz_B1odnQPShCQ@mail.gmail.com>
To: Joshua Bell <jsbell@chromium.org>
Cc: WHAT Working Group <whatwg@lists.whatwg.org>
On Mon, Sep 17, 2012 at 11:13 PM, Joshua Bell <jsbell@chromium.org> wrote:
> I've attempted to distill the above into the spec in an algorithmic way:
> http://wiki.whatwg.org/wiki/StringEncoding#TextDecoder
> English version: If you specify "utf-16" you get endian-agnostic UTF-16
> encoding support. Failing that, if your encoding matches your BOM it is
> consumed. Failing *that*, you get whatever behavior falls out of the decode
> algorithm (garbage, error, etc).

Why would we want the API to work different from how it works in
markup (with <meta charset> etc.)? Granted it's not super logical, but
I don't really see why we should make it inconsistent and more

Received on Monday, 17 September 2012 21:17:48 UTC

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