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

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

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 12 Jun 2009 22:34:10 +0000 (UTC)
To: Jeff Walden <jwalden@MIT.EDU>
Cc: public-webapps@w3.org
Message-ID: <Pine.LNX.4.62.0906122230440.1648@hixie.dreamhostps.com>
On Tue, 2 Jun 2009, Jeff Walden wrote:
> The specification should say what happens when 
> WebSocket.postMessage(data) is called where data is not structurally 
> correct UTF-16 -- lone surrogates, backwards surrogates, and any similar 
> structural errors I might have forgotten.  The IETF protocol 
> specification implicitly assumes the data can be encoded as UTF-8 when 
> this may not be the case.  I mentioned similar issues in #whatwg 
> recently for DOM APIs in general, possibly to be handled by WebIDL. 
> Since this instance of that problem explicitly requires interpretation 
> of a bogus DOMString and can't be described as storing a sequence of 
> opaque 16-bit numbers for later retrieval, I think it's worth raising 
> this concern specially, and I would like precise behavior specified 
> before this proceeds to a finalized state.

I've made WebSockets catch unpaired surrogates and throw an exception.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 12 June 2009 22:34:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:12:54 UTC