- From: Maciej Stachowiak <mjs@apple.com>
- Date: Tue, 22 Sep 2009 20:23:59 -0700
- To: Ian Hickson <ian@hixie.ch>
- Cc: Anne van Kesteren <annevk@opera.com>, Doug Schepers <schepers@w3.org>, "www-dom@w3.org" <www-dom@w3.org>
On Sep 22, 2009, at 7:53 PM, Ian Hickson wrote: > On Tue, 22 Sep 2009, Maciej Stachowiak wrote: >> On Sep 22, 2009, at 9:27 AM, Anne van Kesteren wrote: >> >> I agree with Anne. I think we should remove the U+XXXX format >> entirely. >> If you have a string like Q, you can convert it to a unicode numeric >> value for range checking like this: [...] >> >> I don't think the U+XXXX string format does not add any value. > > Are dead keys represented in some way? The string "\x0308" is not a > valid > Unicode string (it has a combining character with no base), but I > don't > see how else we would represent the diaeresis dead key. I hadn't thought of dead keys. According to the spec, the key identifier for the diaeresis dead key is the string "DeadUmlaut". I can see a few possible ways to deal with this: 1) Have a way to get the unicode code point for a dead key. But I think a numeric value would be more useful than the U+XXXX format string. 1.a) This could be a global method that takes strings like "DeadUmlaut" and returns code points as numeric values ; OR 1.b) There could be an attribute on key events that gives the code point, if any, separate from the key identifier. long unicodeCodePoint for instance. 2) Alternately - even though "\x0308" is not a valid Unicode string, it can still be represented as a DOM string and as a JavaScript string, since both the DOM and JavaScript define strings as sequences of 16-bit UTf-16 code units, and may represent invalid strings (including even such things as containing only one code unit of the two that comprise a surrogate pair). Thus, identifiers like "DeadUmlaut" could be replaced with ones like "\x0308". Regards, Maciej
Received on Wednesday, 23 September 2009 03:24:40 UTC