Earlier quoted context omitted.
You don't, there is only one unicode representation of those characters.
So what does mac do with those ?
APFS does not normalize Unicode filenames
61–70 of 148 posts
Re: APFS does not normalize Unicode filenames
#62Earlier quoted context omitted.
This feels in some sense like punting the problem. What exactly should the presentation layer do when presenting two files, where the first is named with a precomposed character sequence, and the other has the same name but decomposed? Surface the normalization form the user? Uh, no... The more fundamental question is whether filenames are under control of the user or the system. The answer today is "both": there's b…
I'd argue: Use a langauge with generics and make the path type a ((de-)serializable) black box. You still need to make a decision in the end, but are much more free to change it.
Re: APFS does not normalize Unicode filenames
#63More generally, once APFS is deployed users can legitimately end up with multiple files in the same folder whose names only differ in normalization. The initial message that starts this off seems to imply the opposite - instead, application developers should be normalizing the name before handing it to the filesystem. In that case, an application which allowed non-normalized naming would arguably have a bug.
You wouldn't say "the OS doesn't check file attributes to see whether you are allowed to access a file; that's left to applications", either.
Re: APFS does not normalize Unicode filenames
#64Wouldn't this be seen as an issue in betas? I haven't seen anything indicating this is widespread so far? Why would that be, just not wide enough deployment yet?
Mabe most beta testers are based in english-speaking countries and countries where most people are used to stay away from non-english characters and never noticed the problem? I live in Sweden and still avoid using åäö in filenames because of old habits from DOS/Atari era.
They are our tools, not the other way around ;-)
Re: APFS does not normalize Unicode filenames
#65Earlier quoted context omitted.
How do you normalize arab or chinese in a meaningful way for people speaking these languages ?
You don't, there is only one unicode representation of those characters.
Unicode and UTF-8 unify many Traditional & Simplified Chinese Characters as well as Japanese Kanji and Korean Hanja.
There were some extremely angry reactions to Han Character Unification[1], though efforts have been made to overcome many of the initial complaints.
[1] "Why Unicode Won’t Work on the Internet: Linguistic, Political, and Technical Limitations" http://www.hastingsresearch.com/net/04-unicode-limitations.s...
Re: APFS does not normalize Unicode filenames
#66Re: APFS does not normalize Unicode filenames
#67Re: APFS does not normalize Unicode filenames
#68Re: APFS does not normalize Unicode filenames
#69I agree that this is a good change. Unicode, normalisation, character encodings, etc. should really be handled at the presentation layer, and everything below that just treats filenames as sequences of bytes, perhaps with one or two exceptions like '/' and \0. It is interesting to consider a theoretical system in which paths are represented in 0-terminated count-length format (e.g. "foo/bar/baz/myfile.txt" would be "…
And much, much harder for applications if that "bag of bytes" is an invalid UTF-8 sequence. You will end up with an invalid string (or an exception), and trying to open that file will then fail.
I'd really hope that Apple checks that the filenames are valid UTF-8 as they otherwise can end up with very interesting security bugs.
Re: APFS does not normalize Unicode filenames
#70Earlier quoted context omitted.
This feels in some sense like punting the problem. What exactly should the presentation layer do when presenting two files, where the first is named with a precomposed character sequence, and the other has the same name but decomposed? Surface the normalization form the user? Uh, no... The more fundamental question is whether filenames are under control of the user or the system. The answer today is "both": there's b…
> What exactly should the presentation layer do when presenting two files, where the first is named with a precomposed character sequence, and the other has the same name but decomposed? Show two files with apparently identical names. Is that so surprising? There are many many ways for two different Unicode strings to look visually identical (or near-identical) even if they aren't equivalent under normalization. For…