3 ms·
For tips on working with different filesystems, especially filesystems that have different approaches to normalization, see an article I wrote: https://nodejs.
by jorangreef 9y ago
For tips on working with different filesystems, especially filesystems that have different approaches to normalization, see an article I wrote:
https://nodejs.org/en/docs/guides/working-with-different-filesystems/ https://nodejs.org/en/docs/guides/working-with-different-fil...
The gist is that normalization should only ever be used for comparison (if needed, e.g. "do these two files have filenames that would look the same to user"), and never for changing data (filenames are user data and should be stored verbatim without normalization). HFS+ should never have used normalization in the first place. You can think of normalization as essentially a lossy hash function (you cannot get back to HFS+ NFD form once you normalize it to NFC - HFS+ NFD and NFD proper are not the same thing - many people don't realize this). Using normalization for anything other than temporary comparison leads to data loss.