[whatwg] bug 764234, String encoding / decoding API, adjustng code point by N.

Glenn Maynard glenn at zewt.org
Mon Aug 13 22:31:17 PDT 2012

On Tue, Aug 14, 2012 at 12:00 AM, Bonnie Surender <bsurender at mozilla.com>wrote:

> Wrt to https://bugzilla.mozilla.org/show_bug.cgi?id=764234 and API
> description http://wiki.whatwg.org/wiki/StringEncoding section "Note to
> Implementers", "Some encode/decode algorithms require adjusting thecode
> point pointer  orbyte pointer  by a negative amount.", " N is defined by
> the specific encoding algorithm."
> Where can I find the definition of 'N' for the specific encoding
> algorithm? I can't seem to find it at http://dvcs.w3.org/hg/**
> encoding/raw-file/tip/**Overview.html#encodings<http://dvcs.w3.org/hg/encoding/raw-file/tip/Overview.html#encodings>
> .

It needs to be inferred from the algorithms.

I doubt any of them require rewinding more than a couple bytes; picking a
liberally "large" value like 16 is probably safe for everything.  There's
no point in trying to minimize it just to save a couple bytes of buffer.

Glenn Maynard

More information about the whatwg mailing list