git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Torsten BögershausenNext: Erik Faye-Lund
Message 2 of 10 in “git on Mac OS and precomposed unicode”
  1. git on Mac OS and precomposed unicodeTorsten Bögershausen, Jan 21, 2012
  2. Carlos Martín NietoJan 21, 2012
  3. Erik Faye-LundJan 29, 2012
  4. Junio C HamanoJan 21, 2012
  5. Nguyen Thai Ngoc DuyJan 22, 2012
  6. Nguyen Thai Ngoc DuyJan 22, 2012
  7. Torsten BögershausenJun 24, 2012
  8. Robin RosenbergJul 25, 2012
  9. Torsten BögershausenJan 29, 2012
  10. Torsten BögershausenJan 29, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.