News for hackers. Stuff that matters.
Re:Why to normalize Unicode strings by zackmorris on Wednesday March 13, 2019 @06:20PM (#19384511)
Note that Apple's APFS doesn't normalize Unicode filenames:

https://news.ycombinator.com/item?id=13953800

From what I understand, it stores them as-is but can read any (so is normalization insensitive):

https://medium.com/@yorkxin/apfs-docker-unicode-6e9893c9385d

https://developer.apple.com/library/archive/documentation/Fi...

This hit me a couple of years ago when I was working on a scraper and storing the title of the page as the filename. It looked fine, but would fail a Javascript string comparison. I can't remember if I was using HFS+ though, which I believe saved filenames as NFD:

https://en.wikipedia.org/wiki/HFS_Plus#Criticisms

The same script might work today on APFS.

Re:Why to normalize Unicode strings by watersb on Wednesday March 13, 2019 @07:33PM (#19385072)
HFS+ uses Form D.

I had to remember to create my ZFS volumes with Form D enabled, as it isn't an attribute that can be changed afterwards.

IIRC, ZFS on Mac OS X would set that by default so if you created the volumes from a Mac, then ok. But I was creating my ZFS array on a Linux or OpenSolaris server, where I would need to set Form D Normalization explicitly.