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

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

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 28 Jun 2007 12:47:31 +0200
To: "Cameron McCormack" <cam@mcc.id.au>, public-webapi@w3.org
Message-ID: <op.tumn9hy664w2qv@annevk-t60.oslo.opera.com>

On Thu, 28 Jun 2007 05:57:09 +0200, Cameron McCormack <cam@mcc.id.au>  
>> 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<unsigned short> there.
> Fixed.
> I still am a little unsettled by the special casing of
> sequence<unsigned short> 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  

   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.

Anne van Kesteren
Received on Thursday, 28 June 2007 10:47:52 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:23 UTC