News for hackers. Stuff that matters.
Re:APFS does not normalize Unicode filenames by QuercusMax on Saturday March 25, 2017 @12:17AM (#13954080)
This seems especially bad because US-based developers who don't test with unicode filenames might not come across this issue, leaving all their non-English-speaking customers broken. (Not that this excuses such developers in any way.)

It also means that, yet again, every app will need to be updated for a new version of iOS. Makes me wonder how many apps will be left behind if not updated? Thousands? Hundreds of thousands? Millions?

Re:APFS does not normalize Unicode filenames by hamstergene on Saturday March 25, 2017 @12:20PM (#13956296)
I'm going through apps on my phone and can hardly think what any of them would use Unicode filenames for. Say, a messenger might use user's nickname to name a history file — that would cause one-time loss of history, but not break the app. What else?

Something tells me practically no apps will be seriously affected.

Re:APFS does not normalize Unicode filenames by comex on Saturday March 25, 2017 @05:26PM (#13957650)
Any app that stores files in iCloud Drive has a fully user-accessible chunk of filesystem; it has to give the files meaningful names and properly handle files being renamed, added, etc. from the iCloud Drive app or file picker.

So they have to deal with arbitrary filenames; on the other hand, for the same reason, they can't maintain a master list of files somewhere which would break, but have to check the actual directory contents instead. Still, things like history or links between files might be broken.

That is, unless NSFileCoordination APIs act differently wrt normalization; iCloud clients have to use those rather than accessing the filesystem directly.

Re:APFS does not normalize Unicode filenames by __david__ on Saturday March 25, 2017 @11:39PM (#13958986)
> they can't maintain a master list of files somewhere which would break, but have to check the actual directory contents instead.

They should be doing that anyway. Anything else is just begging to get out of sync at some point.

Re:APFS does not normalize Unicode filenames by xenadu02 on Saturday March 25, 2017 @12:38AM (#13954132)
You should not be using anything other than UUIDs or integers for file names. Maintain your own mapping in a database or file.

Using a network value or a value returned by an API is just asking for trouble.

If a user names a file that will be hidden behind a URL the same advice applies. If not then the user can use any sequence of bytes they want and you shouldn't care.

Re:APFS does not normalize Unicode filenames by astrange on Saturday March 25, 2017 @02:12AM (#13954338)
It's poor UI to not name a file on the user's own machine, if they'll ever have to look at it. I'm counting things like web browser caches in this because OmniDiskSweeper/etc users will be seeing the large files you put in there.
Re:APFS does not normalize Unicode filenames by madeofpalk on Saturday March 25, 2017 @08:29AM (#13955287)
Most importantly, APFS is first being rolled out to iOS where this isn't as much of a problem because the user never really sees the filesystem anyway.
Re:APFS does not normalize Unicode filenames by eptcyka on Saturday March 25, 2017 @01:53PM (#13956743)
It doesn't matter much on iOS, where users rarely if at all have to access the filesystem directly. It is very rare that the same files would be accessed and modified by more than a single application anyway.
Re:APFS does not normalize Unicode filenames by _jal on Saturday March 25, 2017 @08:51AM (#13955379)
Assuming your application is the only app that will ever interact with a file is only correct in very specific circumstances. This is terrible advice in the general case.
Re:APFS does not normalize Unicode filenames by spullara on Saturday March 25, 2017 @12:25AM (#13954105)
Except filesystem experts like Dropbox, developers probably shouldn't be letting users name their files.
Re:APFS does not normalize Unicode filenames by andybak on Saturday March 25, 2017 @10:56AM (#13955951)
I'm not sure I understand. How can an app NOT allow me to name my files - unless you're talking about some iOS-like "hide the filesystem" silo.