I'm happy that the filesystem treats name as sequences of bytes. Normalization should happen at a higher level.
APFS is not safe to use with names which have Unicode normalisation issues
11–20 of 191 posts
Re: APFS is not safe to use with names which have Unicode normalisation issues
#12To be honest, I blame Unicode. Why allow different representations for the same character, and then provide a normalized form anyway, except it's not one normalized form but several? Sounds like job security to me.
Re: APFS is not safe to use with names which have Unicode normalisation issues
#13To be honest, I blame Unicode. Why allow different representations for the same character, and then provide a normalized form anyway, except it's not one normalized form but several? Sounds like job security to me.
Re: APFS is not safe to use with names which have Unicode normalisation issues
#14The title is click-bait and over-dramatises the issue. The choice of APFS is that a filename is a sequence of bytes. Nothing more, nothing less (feel free to correct me if I'm wrong here). If you want to see the kind of issues that path normalisation brings, check out this: https://github.com/thibaudgg/rb-fsevent/blob/master/ext/fsev... I'd like to believe that most developer would prefer the current behaviour over t…
The problem seems to come from the high-level APIs doing normalization. So if you have two files in a directory, one normalized and one not-normalized and open the non-normalized file, the high-level API will then normalize that filename and you open the wrong file. I've always disliked the practice of messing around with file paths (storing them, concatenating them, etc). I preferred the way that the Classic MacOS t…
Re: APFS is not safe to use with names which have Unicode normalisation issues
#15Re: APFS is not safe to use with names which have Unicode normalisation issues
#16The real problem isn't whether filename normalization is a good/bad thing, the problem is Apple used to do it one way and is now switching without warning to doing it the other way . It's the logical end product of the odyssey from Apple's original philosophy of a resource and data fork model for files to the UNIX stream-of-bytes model for files. The UNIX model traditionally kept metadata about files separate (anyone…
The former resource fork is in ._$filename. You won't see it, unless you copy the file to smb share or zip it.
Re: APFS is not safe to use with names which have Unicode normalisation issues
#17Anyway, it looks like the issues raised in this (April) blog post will not actually apply to iOS 11 or macOS High Sierra.
Re: APFS is not safe to use with names which have Unicode normalisation issues
#18To be honest, I blame Unicode. Why allow different representations for the same character, and then provide a normalized form anyway, except it's not one normalized form but several? Sounds like job security to me.
Blame the encodings that came before it: Latin-1 and Windows-1252, and all the other ones. Hindsight is always 20/20, y'know.
Re: APFS is not safe to use with names which have Unicode normalisation issues
#19In fact, I think the normalization HFS+ does is more problematic. For example, fish shell can't complete file names when you use un-normalized characters in the input. [0][1]
Edit:
0: "Unicode normalization issues with HFS+" https://github.com/fish-shell/fish-shell/issues/474
1: "Completion does not work for special characters" https://github.com/fish-shell/fish-shell/issues/1794
Re: APFS is not safe to use with names which have Unicode normalisation issues
#20To be honest, I blame Unicode. Why allow different representations for the same character, and then provide a normalized form anyway, except it's not one normalized form but several? Sounds like job security to me.
Blame the encodings that came before it: Latin-1 and Windows-1252, and all the other ones. Hindsight is always 20/20, y'know.