W3C home > Mailing lists > Public > public-script-coord@w3.org > October to December 2012

Re: IDL: special DOMString that converts to Unicode

From: Anne van Kesteren <annevk@annevk.nl>
Date: Tue, 30 Oct 2012 10:01:25 +0100
Message-ID: <CADnb78h8+9VEr5ijyQKWjjqnTpDn0f0itpTiydAMeOze12Ckng@mail.gmail.com>
To: Brendan Eich <brendan@mozilla.org>
Cc: Simon Pieters <simonp@opera.com>, Robin Berjon <robin@w3.org>, public-script-coord@w3.org
On Mon, Oct 29, 2012 at 6:20 PM, Brendan Eich <brendan@mozilla.org> wrote:
> In general, interface != implementation. Possibly these interfaces really
> are implementation-specific, but suppose I want to implement XHR's
> interfaces in JS and pass them off to a testsuite. Would the JS
> implementation have to validate? Should it?

No UTFString means the same as DOMString except that lone surrogates
get replaced with U+FFFD. There's no exception throwing related to it.
I would classify this as an effect at the binding level as either the
string stays a sequence of code units or it gets converted to a
sequence of code points.

I agree that we should not use UTFString for cases where
http://encoding.spec.whatwg.org/ is not involved and Web IDL should
probably indicate something to that effect. We could name it
"CodePointString" maybe so people are more likely to pick the shorter
variant (as they should), but in the end implementors should review
specifications as well before they implement them and if they use
UTFString/CodePointString incorrectly it should be fixed at that
point.


-- 
http://annevankesteren.nl/
Received on Tuesday, 30 October 2012 09:01:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:07 UTC