Making the identifier identification strawman less restrictive
ecmascript at lindenbergsoftware.com
Wed Oct 9 18:36:05 PDT 2013
On Oct 9, 2013, at 0:27 , Mathias Bynens <mathias at qiwi.be> wrote:
>> - Step 11 would allow all Unicode code points that are matched by the IdentifierStart production, including supplementary code points, which ES 5 does not permit in identifiers. (Note that Unicode 3.0, the version referenced by the ES 3 and ES 5 specs, was the last one that did not define any supplementary characters, so the spec as proposed doesn't have that problem).
> Step 11 says “If cp is matched by the IdentifierStart production in edition `edition` of the ECMAScript Language Specification using Unicode version `unicode`, then return `true`” so this is not a problem either way. ES5 `IdentifierStart` doesn’t include supplementary code points, like you said, because of the way ES5 defines “character”.
You're right. In re-checking this, I also found that the proposed algorithm could leave edition undefined, so I fixed that.
>> - Implementations that don't support Unicode 6.3 yet, e.g., because they rely on Unicode information provided by the operating system, would not be able to comply with the spec.
> Which implementations do that? The ones I’ve seen all use custom-generated Unicode data files. Is this really an issue?
I haven't seen the implementation, but my tests find that IE 10 running on Windows 7 supports the BMP subset of Unicode 5.1 in identifiers, and rejects newer BMP characters. Unicode 5.1 happens to be the version supported in Windows 7 in general. Unicode 5.2 was published in October 2009, IE 10 in October 2012, so there would have been enough time to update an IE-internal table.
More information about the es-discuss