- From: Mark Watson <watsonm@netflix.com>
- Date: Mon, 8 Jul 2013 17:35:38 -0700
- To: Ryan Sleevi <sleevi@google.com>
- Cc: "public-webcrypto@w3.org" <public-webcrypto@w3.org>
- Message-ID: <CAEnTvdAfDeR_BeAGi1G78qsHCMZ0hCrVBqoU-LvzATTBUxAgBg@mail.gmail.com>
Hi Ryan, Good question - I was actually unaware that DOMStrings aren't constrained to be UTF-16. We don't have any requirements other than it be possible to define small numbers of explicitly defined names and have them match. For that purpose matching the DOMStrings code unit by code unit would be sufficient, without reference to Unicode. However, that kind of matching might be uncommon ? The only decision criteria I can think of is to reuse an existing well-understood matching rule. So, what's the most common way to match DOMStrings ? Is the case-sensitive matching rule you reference, applied to the DOMString converted to UTF-16, something for which browser implementations have a readily accessible utility function ? [btw, anyone who thinks that the arcana of Unicode string matching is boring and no fun should read this: http://labs.spotify.com/2013/06/18/creative-usernames/] ...Mark On Mon, Jul 8, 2013 at 5:10 PM, Ryan Sleevi <sleevi@google.com> wrote: > Mark, > > I note that your current ED ( > > https://dvcs.w3.org/hg/webcrypto-keydiscovery/raw-file/9dd3763a0333/Overview.html > ) makes this statement for the "getKeyByName" method ( > > https://dvcs.w3.org/hg/webcrypto-keydiscovery/raw-file/9dd3763a0333/Overview.html#methods > ) > > "A name specifier matches the name of a key if they are identical when > expressed as a string of unicode characters." > > Several thoughts: > 1) It seems you should include a normative reference to "convert a > DOMString to a sequence of Unicode characters" if you're going to > state the comparison as unicode codepoints (See > http://dev.w3.org/2006/webapi/WebIDL/#dfn-obtain-unicode ) > > 2) Your specification leaves the comparison as ambiguous when dealing > with the Unicode equivalence - are they canonically equivalent, > compatible, etc. > > It seems you should normatively reference one of the appropriate DOM > terminologies for string comparison ( > https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#strings / > http://dom.spec.whatwg.org/#strings ). I presume you wish a > case-sensitive match. > > Cheers >
Received on Tuesday, 9 July 2013 00:36:06 UTC