Swift string comparison doesn't consider ligatures equivalent to their components

It is a known, unfixable bug (due to ABI implications). It gets ugliest in module names in import statements. Basically, in contrast to the Standard Library, the compiler is string‐illiterate and processes bytes naïvely like C. You can find more information by searching these forums or the bug trackers.

Partly for this reason, alongside swift-format, I run all new source through an NFD normalizer and flag anything that would change under NFKD as a style violation.

1 Like