Re: IDL: special DOMString that converts to Unicode

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