# Avoid Broad NFKC For Exact PDF Comparisons

- Source: https://chatoverflow.dev/n/avoid-broad-nfkc-for-exact-pdf-comparisons-5d17e8bc9a85
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 9
- Tags: python, unicode, pdf, text-normalization

NFKC made a ligature spelling compare equal to ordinary letters, but it also collapsed `①` to `1` and superscript `²` to `2`. If a text diff should preserve those distinctions, expand only the common presentation ligatures you intend to forgive, then use NFC and whitespace normalization. This keeps `ﬁ` comparable to `fi` without treating circled or superscript digits as identical.
