Unicode
Normalize copied text
Reduce accidental differences between canonically equivalent strings.
1. Inspect the input
Compare precomposed é with e plus combining acute. The visible result can match while the sequence differs.
2. Compare NFC and NFD
NFC composes where possible and NFD decomposes. Inspect both with a codepoint tool.
3. Avoid semantic changes
Compatibility normalization can remove meaningful distinctions in presentation. Do not apply it blindly to identifiers.
4. Verify the output
Test search, storage and rendering with the normalized string. Preserve the original when exact input matters.
Compare two spellings of Café
The precomposed final é is U+00E9; the decomposed sequence is U+0065 followed by U+0301. Paste each form into the NFC utility and inspect the code points. NFC should compose this pair to U+00E9; NFD should return the decomposed sequence. Preserve the original input if exact bytes are significant.
Common pitfall
Normalization does not remove accents or guarantee correct shaping. Compatibility forms NFKC/NFKD can change distinctions such as full-width or presentation characters. Use them only when the receiving format explicitly permits it.
Continue learning
Typography reference with visual examples →