W3C home > Mailing lists > Public > public-webapps@w3.org > April to June 2009

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

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 17 Jun 2009 16:26:33 +1000
To: public-webapps@w3.org
Cc: jwalden@mit.edu, jonas@sicking.cc, annevk@opera.com
Message-ID: <20090617062631.GB4573@arc.mcc.id.au>
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 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:31 GMT