[whatwg] StringEncoding open issues
Anne van Kesteren
annevk at annevk.nl
Mon Sep 17 14:17:19 PDT 2012
On Mon, Sep 17, 2012 at 11:13 PM, Joshua Bell <jsbell at 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
complicated.
--
http://annevankesteren.nl/
More information about the whatwg
mailing list