Re: [whatwg] StringEncoding open issues

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
complicated.


-- 
http://annevankesteren.nl/

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