CharacterCodes.net

Unicode Decomposition Types

Some Unicode characters can be represented not just as a single code point, but as a sequence of two or more code points that, when rendered together, produce the same visual result. This process is known as decomposition. For example, a character like “é” (U+00E9) can be decomposed into the base letter “e” (U+0065) followed by a combining acute accent (U+0301). In this form, the accent is not a standalone spacing character but a combining mark that attaches to the preceding character. Unicode defines standard decomposition mappings for many characters so that equivalent text can be represented consistently, even if it originates from different sources or input methods.

A canonical decomposition breaks a character down into a sequence that is considered fully equivalent in both appearance and meaning. These decompositions are reversible and stable, meaning that the original composed character and its decomposed form should be treated as identical for text processing purposes. This is important for operations like string comparison, searching, and normalization. Unicode normalization forms such as NFC (Normalization Form Composed) and NFD (Normalization Form Decomposed) rely on canonical decomposition to ensure that visually identical text—regardless of how it is encoded—can be matched reliably.

In contrast, a compatibility decomposition expands characters into sequences that preserve the underlying semantic content but may discard stylistic or formatting differences. These include characters such as ligatures (e.g., “fi” → “f” + “i”), circled numbers (e.g., “①” → “1”), superscripts (e.g., “²” → “2”), and fractions (e.g., “½” → “1” + “/” + “2”). While the visual presentation may change, the textual meaning remains accessible. Compatibility decompositions are used in normalization forms like NFKD and NFKC, which are helpful when formatting distinctions are not important, such as in search indexing or text analysis, allowing different stylistic variants of the same content to be treated as equivalent.

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!
If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong!