Re: git on MacOSX and files with decomposed utf-8 file names
- From
Kevin Ballard <kevin@sb.org>
- Date
- Jan 23, 2008, 16:58 UTC
- Message-ID
- <769D0E1A-8399-458B-8328-FF3642D833BC@sb.org>
- In-Reply-To
- <20080123094052.GB6969@glandium.org>
On Jan 23, 2008, at 4:40 AM, Mike Hommey wrote:
Show 9 quoted lines
> On Wed, Jan 23, 2008 at 03:15:02AM -0500, Kevin Ballard > <kevin@sb.org> wrote: >> "In Mac OS X, SMB, MSDOS, UDF, ISO 9660 (Joliet), NTFS and ZFS file >> systems all store in one form -- NFC. We store in NFC since that >> what >> is expected for these files systems." > > That's the point. It's stored in NFC, but what applications see is > NFD.
I was actually asking for you to show this instead of just asserting it, but I realized I have access to an SMB share myself so I just tested.
And you're right. That's very curious. I guess they did that because the entire Carbon stack was written assuming NFD (back at the same time HFS+ was created), and they wanted to provide a consistent interface to applications. Since the filesystem already uses NFC, renormalizing to NFD shouldn't lose anything (want the original representation back? just normalize back to NFC).
Show 33 quoted lines
>>> - Likewise for Samba shares. >> >> See above. >> >>> - When I had my problems with iso9660 rockridge volumes using NFC >>> (you >>> can create that just fine with mkisofs), the volume is mounted >>> without >>> normalisation, i.e. if you get to a shell and want to access files, >>> you must use NFC, but at least the Finder does transliteration at >>> some >>> stage, because going into the mount point and opening some files >>> fail >>> because it's trying to open the file with the name transliterated to >>> NFD. I just hope the same doesn't happen with other filesystems. >> >> Can you produce a reproducible set of steps for this? Because the >> Finder shouldn't be doing any of this work on its own, all the >> normalization stuff happens directly in HFS+. > > Simple : on a Linux host, create files with NFC names, and create an > iso > image with mkisofs, with rockridge but no joliet. Burn this to a > disc, and > insert the disc in your OSX host, and try to open files from the > finder. > Interestingly, IIRC, Finder is able to copy the files, though. > > As a bonus, try the same with an iso volume name in NFC, it's even > better : > the created mount point is NFD, but it tries to mount on the name in > NFC and > fails. And then you just can't eject the CD anymore.
I was actually hoping for something I could test myself.
-Kevin Ballard
-- Kevin Ballard http://kevin.sb.org kevin@sb.org http://www.tildesoft.com