From: Mark Junker Date: Sat, 19 Jan 2008 20:39:02 GMT Subject: Re: git on MacOSX and files with decomposed utf-8 file names Message-ID: <47925FE6.8020704@web.de> In-Reply-To: Linus Torvalds schrieb: > - let's say that you have a file "Märchen" on just about *any* other OS > than OS X. It could be Latin1 or it could be Unicode, but even if it is > Unicode, I can almost guarantee that the 'ä' is going to be the > *single* Unicode character U+00e4 (utf-8: "\xc3\xa4", latin1: "\xe4") > > So from a cross-OS standpoint, that's the *common* representation, and > yes, you can create the file that way (I don't know what happens if you > actually create it with the Latin1 encoding, but I would not be > surprised if OS X notices that it's not a valid UTF sequence and > assumes it's Latin1 and converts it to Unicode) FWIW: I just made a test and it seems that MacOS X refuses the creation of a file with this invalid name. > Anybody want to creat a compat layer around "readdir()" that does that NFC > conversion on OS X but not elsewhere? Maybe I'll try it. Regards, Mark