Igor Tandetnik wrote:
> /\d/.test("\uFF11")
>
> returns true. U+FF11 is FULLWIDTH DIGIT ONE, and happens to have Unicode
> class Nd (decimal number). However, Ecma-262 (the standard for
> EcmaScript aka JavaScript) explicitly states:
>
> 15.10.2.12 CharacterClassEscape
> The production CharacterClassEscape :: d evaluates by returning the
> ten-element set of characters containing the characters 0 through 9
> inclusive.
>
> So accepting "digits" other than [0-9] appears to be a bug. Am I missing
> something obvious?
Looks like a long standing bug in Spidermonkey. Rhino gives false for
that example.
I have filed <
https://bugzilla.mozilla.org/show_bug.cgi?id=378738>.
--
Martin Honnen
http://JavaScript.FAQTs.com/_______________________________________________
dev-i18n mailing list
dev-i18n@...
https://lists.mozilla.org/listinfo/dev-i18n