Re:APFS is not safe to use with names which have Unicode nor...
by kuon on Tuesday June 06, 2017 @07:07AM
(#14496313)
I'm happy that the filesystem treats name as sequences of bytes. Normalization should happen at a higher level.
[ Parent
| on HN ]
Re:APFS is not safe to use with names which have Unicode nor...
by deong on Tuesday June 06, 2017 @02:05PM
(#14499509)
"Happening at a higher level" is a reasonable solution, if it happens consistently, no matter which higher level you're using. If you have 18 different functions to open a file, and 11 of them normalize and 7 don't, then you're screwed before you even get out the door. Programmers simply aren't capable of getting this right in a consistent way if asked to solve the problem application by application.
Re:APFS is not safe to use with names which have Unicode nor...
by kuon on Wednesday June 07, 2017 @02:55PM
(#14508934)
Higher level doesn't mean in app.
What I mean is that unicode normalization is really hard, and it should be it's own module that can be used regardless of the fs.
app->fopen->unicode normalization->APFS/HFS/FAT...
Re:APFS is not safe to use with names which have Unicode nor...
by deong on Wednesday June 07, 2017 @03:01PM
(#14508977)
In that case, I agree. The problem here seems, from my understanding, to be that what Apple did was more like
app -> CFFile -> unicode normalization -> fopen -> APFS
which screws you because anyone can just call fopen on their own without using the core foundation libraries, leading to inconsistent states in the filesystem. You can be higher level than the filesystem, but only a little bit. You can't be higher level than some API that developers will regularly use (unless you do like ZFS and normalize at lookup rather than create).
Re:APFS is not safe to use with names which have Unicode nor...
by kuon on Wednesday June 07, 2017 @08:31PM
(#14511007)
I guess the ZFS approach is the best one.
Re:APFS is not safe to use with names which have Unicode nor...
by cryptonector on Tuesday June 06, 2017 @12:37PM
(#14498597)
I'm not. The FS should be normalization-preserving/normalization-insensitive! http://cryptonector.com/2010/04/on-unicode-normalization-or-...