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

Re: OS X and umlauts in file names

From
Daniel Barkalow <barkalow@iabervon.org>
Date
Nov 23, 2009, 20:26 UTC
Message-ID
<alpine.LNX.2.00.0911231403100.14365@iabervon.org>
In-Reply-To
<4B0ABA42.1060103@syntevo.com>
On Mon, 23 Nov 2009, 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.

You've already got a bug before involving git at all. You create a file "Überlänge.txt", but OS X writes "U:berla:nge.txt" (typing the combining character umlaut as : so that you can see the difference), and the directory listing doesn't contain any files that start with Ü, so the terminal already can't find the file you created. Obviously, git is going to have all the problems that the OS-provided readline library has, and you're not going to be able to get predictable results in any case where user-supplied filenames are compared with directory listings.

Part of the problem is that OS X does a canonicalization that is not what anybody else does, so you hit the problem every single time, but the fundamental issue is that there isn't any way to tell, when you create a file, what name that file will be listed under.

Note that this isn't a matter of characters to byte sequences. OS X actually uses different characters for the filename in its listings than you've used.

If there's a difference between German and English versions, I suspect that it's actually that you're not using a German keyboard with a key that, under OS X, produces the two-character sequence U:, but using some method that produces the single character Ü. I'd guess that your SmartGit problem is that Java is converting the U: that the user typed into Ü, and passing it to the OS, which turns it back into U: and then doesn't list the file that Java thinks the user asked for.

	-Daniel
*This .sig left intentionally blank*
Previous: Martin LanghoffNext: Thomas Singer
Message 8 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.