Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Internationalization Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

RWUNormalizer

Module:  Internationalization Module   Group:  Unicode String Processing


Does Not Inherit

Local Index

Members

Header File

#include <rw/i18n/RWUNormalizer.h>

Description

RWUNormalizer converts a string into a particular normalized form, and detects whether a string is already in a particular form.

Many text strings can be represented by more than one sequence of Unicode characters. This is because the Unicode standard recognizes two types of character equivalence:

These two types of character equivalence give rise to four normalization forms:

Each normalization form produces a unique representation for a given string.

Note that two of the normalization forms, NFD and NFKD, replace composite characters with their canonical decompositions. The other two forms, NFC and NFKC, perform the opposite operation--they replace sequences of characters with canonical composites, where possible.

Also note that two of the normalization forms, NFD and NFC, do not affect compatibility characters. These normalization forms are non-lossy; that is, a string may be converted to NFD or NFC with no loss of information. The other two forms, NFKD and NFKC, replace compatibility characters with their nominal equivalents. As compatibility characters may differ in appearance from their nominal equivalents, information may be lost in converting a string to NFKD or NFKC. In other words, converting to NFKD or NFKC is a lossy operation.

Example

Public Enums

enum NormalizationForm { FormNFD,
                         FormNFKD,
                         FormNFC,
                         FormNFKC
};
enum CheckResult { Yes,
                   No,
                   Maybe
};

Static Member Functions

static RWUString
normalize(const RWUString& source,
          NormalizationForm form = FormNFC);
static CheckResult
quickCheck(const RWUString& source, 
           NormalizationForm form = FormNFC);
static CheckResult
quickFcdCheck(const RWUString& source);


Previous fileTop of DocumentContentsIndex pageNext file

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.