Re: [PATCH V4] git on Mac OS and precomposed unicode
- From
Carlos Martín Nieto <cmn@elego.de>
- Date
- Jan 21, 2012, 22:28 UTC
- Message-ID
- <1327184934.31804.32.camel@centaur.lab.cmartin.tk>
- In-Reply-To
- <201201212036.57632.tboegi@web.de>
On Sat, 2012-01-21 at 20:36 +0100, Torsten Bögershausen wrote:
Show 19 quoted lines
> Allow git on Mac OS to store file names in the index in precomposed unicode, > while the file system uses decomposed unicode. > > The problem: > When a file called "LATIN CAPITAL LETTER A WITH DIAERESIS" > (in utf-8 encoded as 0xc3 0x84) is created, the Mac OS filesystem > converts "precomposed unicode" into "decomposed unicode". > This means that readdir() will return 0x41 0xcc 0x88. > > Git under Mac OS reverts the unicode decomposition of filenames. > > This is useful when pulling/pushing from repositories containing utf-8 > encoded filenames using precomposed utf-8 like Linux or Windows (*). > > It allows sharing git repositories stored on a VFAT file system > (e.g. a USB stick), and mounted network share using samba. > > * (Not all Windows versions support UTF-8 yet: > Msysgit needs the unicode branch, cygwin supports UTF-8 since 1.7)
This might be overly pedantic, but Windows doesn't really deal with UTF-8. To use Unicode you need to use the "wide" variant of the functions, and those take UTF-16.
cmn