Re: "send data using the Web Socket" and UCS-2

Jonas Sicking:
> Yes, I don't see how we could handle this in WebIDL, other than
> defining that all DOMStrings must be structurally correct UTF-16.
> However that would be prohibitively expensive since we would have to
> add checks in many many places.

I agree, I don’t think it would be good to require this.

Anne van Kesteren:
> Web IDL could define algorithms how you convert a DOMString to and
> from UTF-8. And maybe other encodings if that is desirable.

I added a simple algorithm that converts a sequence of 16 bit code units
to a sequence of Unicode characters, inserting U+FFFD characters when
bad surrogates are used:

  http://dev.w3.org/2006/webapi/WebIDL/#dfn-obtain-unicode

Nothing in Web IDL references this algorithm.  Other specs can do so if
it is useful.

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Wednesday, 17 June 2009 06:27:25 UTC