[whatwg] API for encoding/decoding ArrayBuffers into text

Glenn Maynard glenn at zewt.org
Thu Mar 15 14:09:27 PDT 2012

On Thu, Mar 15, 2012 at 5:03 AM, Anne van Kesteren <annevk at opera.com> wrote:

> We don't have any untagged content to support yet, so let's not create an
>> API that guarantees it'll come into existence.  The heuristics you need
>> depend heavily on the content, anyway (for example, heuristics that work
>> for HTML probably won't for ID3 tags, which are generally very short).
> What I replied to suggested reusing an existing undocumented code path
> which is definitely used to support existing content. From what I remember
> reading about the detector in Gecko it can be quite useful regardless of
> context.

It's used to support text/html content.  There's no content using *this
API* that exists yet, because this API doesn't exist yet.

If we really wanted to expose heuristics, it should be a separate method,
eg. guessEncoding(view) == "Shift-JIS".

Glenn Maynard

More information about the whatwg mailing list