- From: r12a via GitHub <sysbot+gh@w3.org>
- Date: Fri, 16 Dec 2016 14:21:06 +0000
- To: www-international@w3.org
r12a has just labeled an issue for https://github.com/w3c/uievents-key
as "i18n-comment":
== Supplementary characters in ES6 can use code point values ==
https://w3c.github.io/uievents-key/#style-conventions
1.1. Stylistic Conventions
> Unicode character encodings are shown as: \u003d.
https://w3c.github.io/uievents-key/#key-value-tables
2. Keyboard Event key Value Tables, 2nd Note
> There are special internationalization considerations for ECMAScript
escaped characters. CharMod conformance [CharMod] expects the use of
code points rather than surrogate pairs in escapes. ECMAScript escaped
characters use surrogate pairs for characters outside the Basic
Multilingual Plane (\uD84E\uDDC2 for "𣧂", a Chinese character meaning
"untidy"), rather than C-style fixed-length characters (\U000239c2 for
"𣧂") or delimited escapes such as Numeric Character References
("𣧂"). Characters escaped in this manner:
> - are based on UTF-16 encoding, in that it uses surrogate pairs for
values outside the Basic Multilingual Plane
> - are expressed using surrogate pairs, which makes it difficult for
a human to look up the value, and might require unnecessary overhead
for machine processing — this can also cause problems with software
written in the incorrect belief that Unicode is a 16-bit character set
> - are problematic for characters on supplementary planes (emoji, or
Chinese characters on plane 2), some of which are expected to be
input using a keyboard
> - are not be suitable for Java or C, which use different escaping
mechanisms (could be solved with a normalizing method)
These are good points.
Another point would be that this annotation form ties the document to
a specific implementation approach that will become redundant over
time. ES6 already supports a codepoint based escape format, eg.
\u{12345}
(Btw, shouldn't this explanatory text be in the main UI Events spec?
Maybe i just missed it.)
See https://github.com/w3c/uievents-key/issues/31
Received on Friday, 16 December 2016 14:21:12 UTC