[whatwg] API for encoding/decoding ArrayBuffers into text

On Fri, 16 Mar 2012, Charles Pritchard wrote:

> On 3/16/2012 2:17 PM, Boris Zbarsky wrote:
>> On 3/16/12 5:12 PM, Joshua Bell wrote:
>>> FYI, there was some follow up IRC conversation on this. With Typed Arrays
>>> as currently specified - that is, that Uint16Array has platform endianness
>> 
>> For what it's worth, it seems like this is something we should seriously 
>> consider changing so as to make the web-visible endianness of typed arrays 
>> always be little-endian.  Authors are actively writing code (and being 
>> encouraged to do so by technology evangelists) that makes that assumption 
>> anyway....
>
> The DataView set of methods already does this work. The raw arrays are 
> supposed to have platform endianness.
>
> If you see some evangelists skipping the endian check, send them an e-mail 
> and let them know.

Not going to work.

You can't evangelise people into making their code work on architectures 
that they don't own. It's hard enough to get people to work around 
differences between browsers when all the browsers are avaliable for free 
and run on the platforms that they develop on.

The reality is that on devices where typed arrays don't appear LE, content 
will break.

Received on Friday, 16 March 2012 15:19:42 UTC