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

Re: OS X and umlauts in file names

From
TSThomas Singer <thomas.singer@syntevo.com>
Date
Nov 23, 2009, 18:10 UTC
Message-ID
<4B0AD02E.1040408@syntevo.com>
In-Reply-To
<200911231845.04325.trast@student.ethz.ch>
Hi Thomas,

Thanks for the feed-back. I know the problem from SVN, too, but I had the hope, that Git was smarter than SVN for this topic. IIRC, one could get SVN working "somehow" with umlauts on OS X by setting some environment variable. Unfortunately, I don't remember the details any more.

Basically, getting it "somehow" to work on OS X is just one minor step. IMHO Git should standardize on file names in the repository and do the platform-specific conversion independent of any locale setting, if needed. Then and only then it would be possible to get the same characters out of the repository, no matter whether the file was added or checked out on OS X, Linux or Windows.

At the moment we've got a problem report regarding our SmartGit GUI client: the user says, on command line it[1] works (German OS X) but not with SmartGit, for me it doesn't even work on the command line (English OS X). As you may know, Java uses characters for file names, the Java runtime internally converts from the platform-specific byte-representation on disk to characters. I can't simply tunnel the file name as byte array to the invoked Git command - I simply don't know how to transform the characters of the file name to a representation the Git command line client will understand[2].

Tom

[1] e.g. to stage or commit files with umlauts in the file name [2] executing an external command in Java also "only" works with strings (aka characters), not with byte sequences

Thomas Rast wrote:
Show 26 quoted lines
> Thomas Singer wrote:
>> I'm on an English OS X 10.6.2 and I created a sample file with umlauts in
>> its name (Überlänge.txt). When I try to stage the file in the terminal, I
>> can't complete the file name by typing the Ü and hitting the tab key, but I
>> can complete it by typing an U and hitting the tab key. Unfortunately, after
>> executing
>>
>>  git stage Überlänge.txt
> 
> This is because of OS X's unicode normalisation.  Try any of the
> many threads on the topic, e.g.,
> 
>   http://thread.gmane.org/gmane.comp.version-control.git/70688
> 
> The short version is that this Ü is in fact decomposed into an
> U-umlaut duo.
> 
> Considering that this leads to endless fun[*] not just with git, and
> that we German speakers have an easy way out (Ueberlaenge), I can only
> suggest that you avoid umlauts wherever possible to preserve
> the sanity of your users.
> 
> 
> [*] I once had an SVN repo with two different directories both called
> Übungen.  Took me a while to figure out what was going on.
> 
Previous: Thomas RastNext: Johannes Schindelin
Message 3 of 20 in “OS X and umlauts in file names”
  1. Thomas SingerNov 23, 2009
  2. Thomas RastNov 23, 2009
  3. Thomas SingerNov 23, 2009
  4. Johannes SchindelinNov 23, 2009
  5. Thomas SingerNov 23, 2009
  6. Jakub NarebskiNov 23, 2009
  7. Martin LanghoffNov 23, 2009
  8. Daniel BarkalowNov 23, 2009
  9. Thomas SingerNov 25, 2009
  10. B Smith-MannschottNov 25, 2009
  11. Martin LanghoffNov 25, 2009
  12. Martin LanghoffNov 25, 2009
  13. Andreas SchwabNov 25, 2009
  14. Thomas SingerNov 26, 2009
  15. Jay SoffianNov 26, 2009
  16. Thomas SingerNov 27, 2009
  17. Thomas SingerNov 27, 2009
  18. Martin LanghoffNov 27, 2009
  19. Thomas SingerNov 27, 2009
  20. Jay SoffianNov 26, 2009

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.