Earlier quoted context omitted.
While resource forks are deprecated and on the retreat, extended attributes are a new hotness, used extensively (just download a file in the browser, and it will get com.apple.quarantine and com.apple.metadata:kMDItemWhereFroms). These are also shoveled into AppleDouble files. Actually, resource fork is just com.apple.ResourceFork extended attribute. I'm not sure that there are more than 1% of mac users do not exchan…
GP is saying they don't pass around flash drives to do so, not that they don't share files.
APFS is not safe to use with names which have Unicode normalisation issues
131–140 of 191 posts
Re: APFS is not safe to use with names which have Unicode normalisation issues
#132Earlier quoted context omitted.
That's fascinating. What happens on lookup if there's two different files with canonically equivalent names?
Great question! You can't have two such files! Say you create a file with a name that has different NFC and NFD forms, and you create it with the NFC form. Then you go try to create it with the NFD form, well, if doing an exclusive create (O_EXCL) then you'll get EEXIST, else you'll open the existing file.
Re: APFS is not safe to use with names which have Unicode normalisation issues
#133I dont expect my computer to treat charcters that look the same equally.
Even when they are the same character according to Unicode?! (I understand not treating confusable characters as the same. That's a different story.)
For me it seems more like a problem with Unicode. I can see why it is the way it is from a certain perspective. Very connivent.
But it has broken the underlying abstraction layer.
Re: APFS is not safe to use with names which have Unicode normalisation issues
#134Earlier quoted context omitted.
> I've had to write code to deal with normalization changes in archives and it's quite tedious. You need to continue to write this on APFS. Nothing really changed in that regard. It's now just also possible to store denormalized filenames.
Exactly - and that matters to me in cases where the ability to say that someone copying files won't change the checksum on a manifest, which users find extremely confusing.
Re: APFS is not safe to use with names which have Unicode normalisation issues
#135Earlier quoted context omitted.
Almost! But not quite: it aliases some possible filenames, though only they are valid UTF-8 encodings (or UTF-16 say, if one did this on Windows). In particular, it prevents the existence of two files with equivalent names.
In other words, like most RDBMSes, ZFS differentiates "field type" from "collation." "Field type" in an RDBMS controls what can be written (e.g. "valid UTF8 strings"), what will be read back (e.g. the use of the Unicode replacement character), and what special values like NULL will cast to. An RDBMS field's collation controls how values in the field will compare for equality, and what will happen when you sort on tha…
And the n-i string comparison function produces a boolean if I remember correctly, not a trinary. So it doesn't define a collation. But it could define a collation, that's true.
The problem with moving sorting into the kernel is that you now need to have the collations there (English? French? something else? "Unicode" is not enough), and user-land needs to tell the kernel what collation to use for any given process or thread or system call. That's ETOOMUCHWORK for everyone, so it doesn't happen.
Re: APFS is not safe to use with names which have Unicode normalisation issues
#136Earlier quoted context omitted.
Even when they are the same character according to Unicode?! (I understand not treating confusable characters as the same. That's a different story.)
No, in my mind a filename should be an identifier made of a bunch of bytes. How you represent those bytes is not important in the context of the file subsystem. For me it seems more like a problem with Unicode. I can see why it is the way it is from a certain perspective. Very connivent. But it has broken the underlying abstraction layer.
Re: APFS is not safe to use with names which have Unicode normalisation issues
#137Earlier quoted context omitted.
Great question! You can't have two such files! Say you create a file with a name that has different NFC and NFD forms, and you create it with the NFC form. Then you go try to create it with the NFD form, well, if doing an exclusive create (O_EXCL) then you'll get EEXIST, else you'll open the existing file.
so it infact does do normalization on file create then? How is it managing this without doing so?
Re: APFS is not safe to use with names which have Unicode normalisation issues
#138I've been saying this for years: http://cryptonector.com/2010/04/on-unicode-normalization-or-... (originally at blogs.sun.com, now blogs.oracle.com, though I can't find it there). The problem is that most input methods produce something close to NFC while HFS+ decomposes to something close to NFD. Which means that if you cut-n-paste non-ASCII Unicode names from a finder into any app that doesn't normalize, then you'l…
Re: APFS is not safe to use with names which have Unicode normalisation issues
#139Earlier quoted context omitted.
Not true! ZFS also normalizes. However, while HFS+ normalizes on _create_ (bad), ZFS normalizes on lookup (good). Specifically, ZFS has a normalization-preserving, normalization-insensitive behavior -- a lot like case-preserving but case-insensitive behavior, but for normalization forms rather than case. The way this works is that there's a) a string comparison function that can provide normalization- and/or case-ins…
> Not true! ZFS also normalizes. However, while HFS+ normalizes on _create_ (bad), ZFS normalizes on lookup (good). That's not a question of being true or not but referring to different things. The distinction I was trying to make is that HFS+ will force every filename into NFD. With ZFS, the filename as received from the APIs should be the same byte sequence which was used to create it and that avoids an entire cate…
Re: APFS is not safe to use with names which have Unicode normalisation issues
#140I really fail to see why do you want your file system to normalize utf8 chars with hfs+ rules.