3 ms·
That is due to the HFS+ normalization that APFS eliminates. The filename is stored in UTF-16 and OS X converts it to UTF-8.
by yuhong 10y ago
That is due to the HFS+ normalization that APFS eliminates. The filename is stored in UTF-16 and OS X converts it to UTF-8.
- frik 10y agoIs it stored "real UTF-16" or in USC2 wide-chars like in NTFS? The later would be a big problem.
- yuhong 10y agoI believe HFS+ was created before Mac OS supported surrogates.
- eridius 10y agoNormalization and UTF-16 are completely orthogonal. It doesn't matter in the slightest whether the filesystem stores the filename in UTF-16 or UTF-8, either way it's still a sequence of Unicode scalar values, and that's what matters.
- kalleboo 10y agoHFS does a lot more than convert to UTF-8. E.g. it will normalize ö to o+(umlaut), using custom normalization rules that nobody else uses. If you tell HFS to store a file with an Ö in it, and then list the directory, the character Ö is nowhere to be found.