W3C home > Mailing lists > Public > public-webapi@w3.org > June 2007

Re: ECMAScript octet representation (was: Re: Bindings spec ready for FPWD?)

From: liorean <liorean@gmail.com>
Date: Thu, 28 Jun 2007 13:05:37 +0200
Message-ID: <cee13aa30706280405x1748177fmcaae94bf4b1390d8@mail.gmail.com>
To: "Web APIs WG (public)" <public-webapi@w3.org>

On 28/06/07, Anne van Kesteren <annevk@opera.com> wrote:
> On Thu, 28 Jun 2007 05:57:09 +0200, Cameron McCormack <cam@mcc.id.au>
> wrote:
> >> For sequence<octet> it would be really nice if we could have a more
> >> native representation of a byte array than a UTF-16 string.
> >
> > Strange, I really should have used sequence<unsignedshort> there.
> > Fixed.
> >
> > I still am a little unsettled by the special casing of
> > sequence<unsignedshort> for string values.
> >
> > We could revisit the decision not to use wstring, and just state that
> > wstrings must be sequences of UTF-16 code units, and that they can
> > include 0x0000.
>
> It would still be very good to have an octet / byte representation in
> ECMAScript. I'm aware of a couple of implementations of such a thing, but
> I haven't been able to play with them or figure out how they work exactly
> myself:
>
>    1. XMLHttpRequest has a responseBody member in Internet Explorer 7 that
>       returns an array of unsigned integers representing octets.
>
>       Likewise, the send() method accepts such an array.
>
>    2. I heard Adobe Flex has some notion of a byte array to represent files.

Maybe ES4 can come to the rescue here:
<uri:http://developer.mozilla.org/es4/proposals/bytearray.html>
-- 
David "liorean" Andersson
Received on Thursday, 28 June 2007 11:05:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:57 GMT