Normalizing Strings
RWUNormalizer provides a
NormalizationForm enum, with values representing the four normalization forms described in
Normalization Forms:
FormNFD,
FormNFKD,
FormNFC, and
FormNFKC. This enum can be used in conjunction with the static
normalize() method to convert a string into a particular normalization form. For example, the following code converts a string into Normalization Form Decomposed (NFD):
RWUString str("This is a test.");
str = RWUNormalizer::normalize(str, RWUNormalizer::FormNFD);
In converting a string into a particular form, normalize() leaves ASCII characters unaffected, and replaces deprecated characters. The normalize() method never introduces compatibility characters.