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

Re: Git, Mac OS X and German special characters

From
Ddemerphq <demerphq@gmail.com>
Date
May 20, 2010, 08:57 UTC
Message-ID
<AANLkTimKW-eC--JtjOzclfCymhOTizboISDygvTvVbUY@mail.gmail.com>
In-Reply-To
<4BF4F7D7.60002@drmicha.warpmail.net>
On 20 May 2010 10:50, Michael J Gruber <git@drmicha.warpmail.net> wrote:
Show 30 quoted lines
> Ævar Arnfjörð Bjarmason venit, vidit, dixit 20.05.2010 10:34:
>> On Thu, May 20, 2010 at 07:26, Matthias Moeller
>> <matthias.moeller@math.tu-dortmund.de> wrote:
>>> I have been searching the web for help and found lengthy discussions
>>> which state that this is a common problem of the HFS+ filesystem.
>>> What I did not find was a solution to this problem. Is there a solution
>>> to this problem?
>>
>> Is this problem particular to Git, or do you also get it if you
>> e.g. rsync from the Linux box to the Mac OS X box?
>>
>>> #       "U\314\210bersicht.xls"
>>
>> You probably have to configure your shell on OSX to render UTF-8
>> correctly. It's just showing the raw escaped byte sequence instead of
>> a character there.
>>
>> There isn't anything wrong with OSX in this case, filename encoding on
>> any POSIX system is only done by convention. You'll find that you have
>> similar problems on Linux if you encode filename in Big5 or
>> UTF-32.
>>
>> Linux will happily accept it, but your shell / other applications will
>> render it as unknown goo because they expect UTF-8.
>
> No, the problem with git status is not the display. Matthias' problem is
> that git status reports a tracked file as untracked. The reason is that
> on HFS+, you create a file with name A and get a file with name B, where
> A and B are different representations of the same name. There seems to
> be no way to reliably detect which one HFS+ uses.

Judging by the example given the problem is that HFS+ decomposes Unicode file names into latin1+combining characters instead of using normalized utf8.

This implies that if the utf8 is normalized first using canonical unicode normalization rules (to eliminate the combining character) that it can then be compared.

Yves
-- 
perl -Mre=debug -e "/just|another|perl|hacker/"
Previous: Michael J GruberNext: Torsten Bögershausen
Message 4 of 13 in “Git, Mac OS X and German special characters”
  1. Matthias MoellerMay 20, 2010
  2. Ævar Arnfjörð BjarmasonMay 20, 2010
  3. Michael J GruberMay 20, 2010
  4. demerphqMay 20, 2010
  5. Torsten BögershausenMay 20, 2010
  6. Michael J GruberMay 20, 2010
  7. Jay SoffianMay 20, 2010
  8. Jay SoffianMay 20, 2010
  9. Jay SoffianMay 20, 2010
  10. Matthias MoellerMay 20, 2010
  11. Thomas SingerMay 20, 2010
  12. demerphqMay 20, 2010
  13. Michael J GruberMay 20, 2010

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.