Re: git on MacOSX and files with decomposed utf-8 file names

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 23, 2008, at 1:41 AM, Mike Hommey wrote:

On Tue, Jan 22, 2008 at 08:33:25PM -0500, Theodore Tso wrote:
On Tue, Jan 22, 2008 at 04:38:37PM -0800, Linus Torvalds wrote:
One thing I'd like somebody to check: what _does_ happen with OS X and NFS
(OS X as a client, not server)? In particular:

- Is it suddenly sane and case-sensitive?

Using a Linux server, and a OS X client, over NFS, it is in
case-sensitive.  This is not unexpected, since you can mount UFS
partitions on Mac OS X, or reformat HFS+ filesystems and make them be
case-sensitive.

- Does the NFS client do any unicode conversion?

Nope:

# perl -CO -e 'print pack("U",0x00C4)."\n"'  | xargs touch
# ls -l | cat -v
total 0
0 -rw-r--r--   1 nobody  nobody  0 Jan 22 20:30 M-CM-^D

It's pretty clear the Unicode conversion is being done in HFS+, not in
the VFS layer of Mac OS X.

There must be something at the VFS layer, or some other layer:
- IIRC, Joliet iso9660 volumes end up being mounted with files names in
 NFS when the real file names are NFC on the disk.

I assume you mean NFD, not NFS, but here's what one of the HFS+ engineers had to say:

"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."

- 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+.

Also, OSX using NFD widely, a file created from non Unix applications
may end up being named in NFD on any file system. File contents, too,
may end up being transliterated whenever a file is modified with non
Unix applications, introducing unwanted changes.
Typing file names in the Terminal might also make them encoded in NFD,
too.

Entirely possible, though renormalizing file contents seems a bit less likely. I will point out that the text input system in OS X seems to default to producing NFC (at least, typing `echo 'Märchen' | xxd` in the Terminal shows that the input string there is NFC). So user input will most likely produce NFC, the only way you're probably going to end up with NFD is if you move a file from HFS+ to another filesystem.

-Kevin Ballard

--
Kevin Ballard
http://kevin.sb.org
kevin@xxxxxx
http://www.tildesoft.com


<<attachment: smime.p7s>>


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux