Unicode Normalization Referenz
Referenz für Unicode normalization forms: NFC, NFD, NFKC, NFKD und ihre verwenden cases.
Normalization Forms
NFC (Canonical Composition) composes characters and decomposes then recomposes, producing the shortest composed form. NFD (Canonical Decomposition) decomposes all composable characters. NFKC (Compatibility Composition) additionally maps compatibility characters (e.g., fullwidth to ASCII). NFKD (Compatibility Decomposition) decomposes compatibility characters. NFC is the recommended default for storage and interchange. W3C recommends NFC for web content.
- NFC
- Composed, recommended
- NFD
- Decomposed
- NFKC/NFKD
- Compatibility mapping
W3C default for processing fullwidth -> ASCII Practical Considerations
Normalization affects string comparison: visually identical strings may differ in code points without normalization. Database storage should normalize to NFC for consistent comparison and indexing. Search should normalize both query and indexed text. Normalization can change string length (composition shortens, decomposition lengthens). Some languages (e.g., Korean Hangul) have complex composition rules. The choice of form depends on the use case: NFC for storage, NFKC for fuzzy search. Always normalize before comparison.
- comparison
- Normalize first
- storage
- NFC recommended
- search
- NFKC for fuzzy
visual = code point consistent indexing compatibility match