String.prototype.[de]normalize and .isCharXxx are needed

# Herby Vojčík (14 years ago)

Hello,

in certain application, Unicode de/normalization and possibility to query what group the character is is vital, but ECMAScript does not have these methods nor did I see them in any of the proposals?

Are they planned? Or can they be added?

Thanks,

# Norbert Lindenberg (14 years ago)

Nothing planned at this point. Unicode normalization would be a natural candidate for the Globalization API, but it's not in scope for version 1. Support for Unicode character properties probably should be part of regular expressions, as it is in Perl, PHP, Java, and other platforms; there was a proposal for ES4 [1], but it hasn't been taken up for ES5 or Harmony.

[1] proposals:extend_regexps#extending_regexps_for_unicode_ranges

Norbert

# Herby Vojčík (14 years ago)

Norbert Lindenberg wrote:

Nothing planned at this point. Unicode normalization would be a natural candidate for the Globalization API, but it's not in scope for version 1. Support for Unicode character properties probably

Maybe it could be added?

should be part of regular expressions, as it is in Perl, PHP, Java, and other platforms; there was a proposal for ES4 [1], but it hasn't been taken up for ES5 or Harmony.

Well, string comparision sans accents is a sensible use case. To do it via Unicode normalization and then removing all accents is straightforward. Should it (the character properties, however done) not be raised?

# Shawn Steele (14 years ago)

Well, string comparision sans accents is a sensible use case. To do it via Unicode normalization and then removing all accents is straightforward. Should it (the character properties, however done) not be raised?

String comparison doesn't need character properties because comparison frameworks use their own tables, and they also have mechanisms for things like ignoring case or diacritics.

# Norbert Lindenberg (14 years ago)

In order to get version 1 of the Globalization API done and into the hands of users, we're no longer considering new functionality for this version. On the other hand, string comparison (collation) is already included in this version, and the sensitivity option lets you choose whether it should be sensitive to minor differences such as accents. See globalization:specification_drafts, norbertlindenberg.com/2011/11/ecmascript-globalization-api/index.html

Norbert

# Herby Vojčík (14 years ago)

Norbert Lindenberg wrote:

In order to get version 1 of the Globalization API done and into the hands of users, we're no longer considering new functionality for this version. On the other hand, string comparison (collation) is already included in this version, and the sensitivity option lets you choose whether it should be sensitive to minor differences such as accents. See globalization:specification_drafts, norbertlindenberg.com/2011/11/ecmascript-globalization-api/index.html

It was just one simple use-case. I want to do other things for which splitting accents and base character and their differentiation is needed (as for their differentiation, it should not be a big deal, but normalization/denormalization is critical).