On 28/06/07, Anne van Kesteren <[EMAIL PROTECTED]> wrote:
On Thu, 28 Jun 2007 05:57:09 +0200, Cameron McCormack <[EMAIL PROTECTED]>
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