W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: IDL: special DOMString that converts to Unicode

From: Jonas Sicking <jonas@sicking.cc>
Date: Sun, 28 Jul 2013 19:10:39 -0700
Message-ID: <CA+c2ei99wozijhAM6+xh8X4rO1SWbwVXhGWrvP0ReRky1heWqQ@mail.gmail.com>
To: Anne van Kesteren <annevk@annevk.nl>
Cc: Cameron McCormack <cam@mcc.id.au>, Brendan Eich <brendan@mozilla.org>, Allen Wirfs-Brock <allen@wirfs-brock.com>, Simon Pieters <simonp@opera.com>, Robin Berjon <robin@w3.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On Sun, Jul 28, 2013 at 4:58 PM, Anne van Kesteren <annevk@annevk.nl> wrote:
> On Sun, Jul 28, 2013 at 4:38 PM, Jonas Sicking <jonas@sicking.cc> wrote:
>> [EnsureUTF16] is a modifier within the value space, no? It makes the
>> function throw if specific values are provided, but it doesn't mean
>> that new values can be expressed. Just like [EnforceRange] does.
> It is now. And it does not throw, it just replaces lone surrogates.
> However, what I need is something which converts code units into
> Unicode scalar values. Or in other words, I want U+10000 expressed as
> a single code point.

I think what you are saying is that you want to write an algorithm
which walks over unicode code points rather than UTF16 encoded data.
And that that algorithm is triggered by a function call where you'd
like to use this new type.

Is that correct?

If so, I think you can simply express your algorithm as iterating
Unicode data. No need to do that in the WebIDL step.

/ Jonas
Received on Monday, 29 July 2013 02:11:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:17 UTC