Choose safe Unicode normalization and preserve identifiers
Separate display-only cleanup from a transformation that changes an identifier. Compare before and after, and change only when the input owner has allowed it.
A normalization form does not decide safety by itself. Confirm the use and the owner of the input contract.
Verify with fixtures
Read fullwidth.txt, compatibility.txt, combining.txt and identifier.txt, then compare the before/after values and decisions in expected.csv. Do not send real data or overwrite the original identifier.
const display = text.normalize("NFC");
const compatibility = text.normalize("NFKC");
// Keep the original when it is an identifier.
Review in this order
Separate display-only text from IDs, keys, codes, filenames and lookup values.
Check whether the input specification names NFC/NFKC and allows the change.
Keep the original and compare before/after with synthetic fixtures.
If the contract is unknown, mark it for review; do not claim the change is safe.
This guide is static browser-local material. Text and input are not sent to an external server.
Keep identifiers original
Normalization can improve display or search, but it does not guarantee identity. Keep original and display values separate, and use the original as the key unless the owner explicitly permits the transformation.