3

Example in Python:

>>> s = 'ı̇'
>>> len(s)
2
>>> list(s)
['ı', '̇']
>>> print(", ".join(map(unicodedata.name, s)))
LATIN SMALL LETTER DOTLESS I, COMBINING DOT ABOVE
>>> normalized = unicodedata.normalize('NFC', s)
>>> print(", ".join(map(unicodedata.name, normalized)))
LATIN SMALL LETTER DOTLESS I, COMBINING DOT ABOVE

As you can see, NFC normalization does not compose the dotless i + a dot to a normal i. Is there a rationale for this? Is this an oversight? Or is it not included because NFC is supposed to be the perfect inverse of NFD (and one wouldn’t want to decompose i to dotless i + dot).

nwellnhof
  • 32,319
  • 7
  • 89
  • 113
Jonas Schäfer
  • 20,140
  • 5
  • 55
  • 69

1 Answers1

3

While NFC isn't the "perfect inverse" of NFD, this follows from NFC being defined in terms of the same decomposition mappings as NFD. NFC is basically defined as NFD followed by recomposing certain NFD decomposition pairs. Since there's no decomposition mapping for LATIN SMALL LETTER I, it can never be the result of a recomposition.

nwellnhof
  • 32,319
  • 7
  • 89
  • 113
  • 2
    [From TR15](https://www.unicode.org/reports/tr15/#Norm_Forms): ``toNFD(x)=toNFD(toNFC(x))``, so if ``toNFC(x)`` composed ı+dot-above to i, ``toNFD(toNFC(x))`` would be different from ``toNFD(x)`` (if ``i`` would not be decomposed to ı+dot-above; I don’t think that such a decomposition would be desirable). Thanks. – Jonas Schäfer Apr 29 '18 at 14:45