{"thread":{"id":"21727","subject":"OS X and umlauts in file names","startedAt":"2009-11-23T16:37:22Z","lastAt":"2009-11-27T18:35:50Z","messageCount":20,"participants":["Thomas Singer","Thomas Rast","Johannes Schindelin","Martin Langhoff","Daniel Barkalow","Jakub Narebski","B Smith-Mannschott","Andreas Schwab","Jay Soffian"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"128176","messageId":"4B0ABA42.1060103@syntevo.com","threadId":"21727","inReplyTo":null,"subject":"OS X and umlauts in file names","fromName":"Thomas Singer","fromEmail":"thomas.singer@syntevo.com","sentAt":"2009-11-23T16:37:22Z","receivedAt":"2009-11-23T16:37:22Z","isPatch":false,"sender":{"key":"thomas.singer@syntevo.com","avatar":null},"body":"I'm on an English OS X 10.6.2 and I created a sample file with umlauts in\nits name (Überlänge.txt). When I try to stage the file in the terminal, I\ncan't complete the file name by typing the Ü and hitting the tab key, but I\ncan complete it by typing an U and hitting the tab key. Unfortunately, after\nexecuting\n\n git stage Überlänge.txt\n\nI invoked\n\n git status\n\nand it still shows the file as new file. Should I set some environment\nvariable to be able to work with files containing umlauts in the name?\n\nThanks in advance,\nTom\n"},{"id":"128184","messageId":"200911231845.04325.trast@student.ethz.ch","threadId":"21727","inReplyTo":"4B0ABA42.1060103@syntevo.com","subject":"Re: OS X and umlauts in file names","fromName":"Thomas Rast","fromEmail":"trast@student.ethz.ch","sentAt":"2009-11-23T17:45:00Z","receivedAt":"2009-11-23T17:45:00Z","isPatch":false,"sender":{"key":"tr@thomasrast.ch","avatar":"https://avatars.githubusercontent.com/u/153510?v=4"},"body":"Thomas Singer wrote:\n> I'm on an English OS X 10.6.2 and I created a sample file with umlauts in\n> its name (Überlänge.txt). When I try to stage the file in the terminal, I\n> can't complete the file name by typing the Ü and hitting the tab key, but I\n> can complete it by typing an U and hitting the tab key. Unfortunately, after\n> executing\n> \n>  git stage Überlänge.txt\n\nThis is because of OS X's unicode normalisation.  Try any of the\nmany threads on the topic, e.g.,\n\n  http://thread.gmane.org/gmane.comp.version-control.git/70688\n\nThe short version is that this Ü is in fact decomposed into an\nU-umlaut duo.\n\nConsidering that this leads to endless fun[*] not just with git, and\nthat we German speakers have an easy way out (Ueberlaenge), I can only\nsuggest that you avoid umlauts wherever possible to preserve\nthe sanity of your users.\n\n\n[*] I once had an SVN repo with two different directories both called\nÜbungen.  Took me a while to figure out what was going on.\n\n-- \nThomas Rast\ntrast@{inf,student}.ethz.ch\n"},{"id":"128186","messageId":"4B0AD02E.1040408@syntevo.com","threadId":"21727","inReplyTo":"200911231845.04325.trast@student.ethz.ch","subject":"Re: OS X and umlauts in file names","fromName":"Thomas Singer","fromEmail":"thomas.singer@syntevo.com","sentAt":"2009-11-23T18:10:54Z","receivedAt":"2009-11-23T18:10:54Z","isPatch":false,"sender":{"key":"thomas.singer@syntevo.com","avatar":null},"body":"Hi Thomas,\n\nThanks for the feed-back. I know the problem from SVN, too, but I had the\nhope, that Git was smarter than SVN for this topic. IIRC, one could get SVN\nworking \"somehow\" with umlauts on OS X by setting some environment variable.\nUnfortunately, I don't remember the details any more.\n\nBasically, getting it \"somehow\" to work on OS X is just one minor step. IMHO\nGit should standardize on file names in the repository and do the\nplatform-specific conversion independent of any locale setting, if needed.\nThen and only then it would be possible to get the same characters out of\nthe repository, no matter whether the file was added or checked out on OS X,\nLinux or Windows.\n\nAt the moment we've got a problem report regarding our SmartGit GUI client:\nthe user says, on command line it[1] works (German OS X) but not with\nSmartGit, for me it doesn't even work on the command line (English OS X). As\nyou may know, Java uses characters for file names, the Java runtime\ninternally converts from the platform-specific byte-representation on disk\nto characters. I can't simply tunnel the file name as byte array to the\ninvoked Git command - I simply don't know how to transform the characters of\nthe file name to a representation the Git command line client will\nunderstand[2].\n\nTom\n\n[1] e.g. to stage or commit files with umlauts in the file name\n[2] executing an external command in Java also \"only\" works with strings\n(aka characters), not with byte sequences\n\n\nThomas Rast wrote:\n> Thomas Singer wrote:\n>> I'm on an English OS X 10.6.2 and I created a sample file with umlauts in\n>> its name (Überlänge.txt). When I try to stage the file in the terminal, I\n>> can't complete the file name by typing the Ü and hitting the tab key, but I\n>> can complete it by typing an U and hitting the tab key. Unfortunately, after\n>> executing\n>>\n>>  git stage Überlänge.txt\n> \n> This is because of OS X's unicode normalisation.  Try any of the\n> many threads on the topic, e.g.,\n> \n>   http://thread.gmane.org/gmane.comp.version-control.git/70688\n> \n> The short version is that this Ü is in fact decomposed into an\n> U-umlaut duo.\n> \n> Considering that this leads to endless fun[*] not just with git, and\n> that we German speakers have an easy way out (Ueberlaenge), I can only\n> suggest that you avoid umlauts wherever possible to preserve\n> the sanity of your users.\n> \n> \n> [*] I once had an SVN repo with two different directories both called\n> Übungen.  Took me a while to figure out what was going on.\n> \n"},{"id":"128188","messageId":"alpine.DEB.1.00.0911231916510.4897@intel-tinevez-2-302","threadId":"21727","inReplyTo":"4B0AD02E.1040408@syntevo.com","subject":"Re: OS X and umlauts in file names","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2009-11-23T18:23:01Z","receivedAt":"2009-11-23T18:23:01Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Mon, 23 Nov 2009, Thomas Singer wrote:\n\n> Basically, getting it \"somehow\" to work on OS X is just one minor step. \n> IMHO Git should standardize on file names in the repository and do the \n> platform-specific conversion independent of any locale setting, if \n> needed.\n\nThat is contrary to the design of Git which honors content (byte-wise!) as \nmuch as possible, and treats file names very much as content.\n\nThere were beginnings of supporting OSX' brain-damaged filename mangling, \nbut an obnoxious OSX fan worked very hard on trying to defend the OSX \ndesign and to decry Git's respect for the raw bytes on this list, so hard \nthat even the nicest developers had no fun working on this issue anymore.\n\nThis little background may help you understand why there is no solution \nimplemented in Git yet.  And maybe quite a few developers are reluctant to \ndiscuss the issue and possible solutions due to said sad story, too.\n\nCiao,\nDscho\n"},{"id":"128191","messageId":"46a038f90911231029k4da4f37ai44d1b7a7aeefd52e@mail.gmail.com","threadId":"21727","inReplyTo":"4B0AD02E.1040408@syntevo.com","subject":"Re: OS X and umlauts in file names","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2009-11-23T18:29:24Z","receivedAt":"2009-11-23T18:29:24Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Mon, Nov 23, 2009 at 7:10 PM, Thomas Singer\n<thomas.singer@syntevo.com> wrote:\n> I can't simply tunnel the file name as byte array to the\n> invoked Git command - I simply don't know how to transform the characters of\n> the file name to a representation the Git command line client will\n> understand[2].\n\nOuch - so git is respecting whatever name the user and/or OS have\npicked, but Java wants to canonicalize it,  and whatever scheme it\nuses does not match OSX? That must hurt Java usage on OSX a lot. Sure\nthey have a workaround...?\n\nSuggestions:\n\n1 - Configure Java to canonicalize in the same style as OSX. Actually,\nOSX's canonicalization is somewhat arbitrary so I think it exposes a\ncall to canonicalize a string \"the right way\".\n\n2 - Many git calls accept filenames via STDIN - Java will surely write\nbinary there...\n\n3 - xargs with its -z parameter can complement #2\n\nhth,\n\n\nm\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- School Server Architect\n - ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"128201","messageId":"alpine.LNX.2.00.0911231403100.14365@iabervon.org","threadId":"21727","inReplyTo":"4B0ABA42.1060103@syntevo.com","subject":"Re: OS X and umlauts in file names","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2009-11-23T20:26:31Z","receivedAt":"2009-11-23T20:26:31Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Mon, 23 Nov 2009, Thomas Singer wrote:\n\n> I'm on an English OS X 10.6.2 and I created a sample file with umlauts in\n> its name (Überlänge.txt). When I try to stage the file in the terminal, I\n> can't complete the file name by typing the Ü and hitting the tab key, but I\n> can complete it by typing an U and hitting the tab key.\n\nYou've already got a bug before involving git at all. You create a \nfile \"Überlänge.txt\", but OS X writes \"U:berla:nge.txt\" (typing the \ncombining character umlaut as : so that you can see the difference), and \nthe directory listing doesn't contain any files that start with Ü, so the \nterminal already can't find the file you created. Obviously, git is going \nto have all the problems that the OS-provided readline library has, and \nyou're not going to be able to get predictable results in any case where \nuser-supplied filenames are compared with directory listings.\n\nPart of the problem is that OS X does a canonicalization that is not what \nanybody else does, so you hit the problem every single time, but the \nfundamental issue is that there isn't any way to tell, when you create a \nfile, what name that file will be listed under.\n\nNote that this isn't a matter of characters to byte sequences. OS X \nactually uses different characters for the filename in its listings than \nyou've used.\n\nIf there's a difference between German and English versions, I suspect \nthat it's actually that you're not using a German keyboard with a key \nthat, under OS X, produces the two-character sequence U:, but using some \nmethod that produces the single character Ü. I'd guess that your SmartGit \nproblem is that Java is converting the U: that the user typed into Ü, and \npassing it to the OS, which turns it back into U: and then doesn't list \nthe file that Java thinks the user asked for.\n\n\t-Daniel\n*This .sig left intentionally blank*"},{"id":"128202","messageId":"4B0AF11A.3030804@syntevo.com","threadId":"21727","inReplyTo":"alpine.DEB.1.00.0911231916510.4897@intel-tinevez-2-302","subject":"Re: OS X and umlauts in file names","fromName":"Thomas Singer","fromEmail":"thomas.singer@syntevo.com","sentAt":"2009-11-23T20:31:22Z","receivedAt":"2009-11-23T20:31:22Z","isPatch":false,"sender":{"key":"thomas.singer@syntevo.com","avatar":null},"body":"I agree, that getting it done correctly could be a long and hard (maybe\nincompatible) way. Neglecting the problem or blaming platform specific\n\"anomalies\" does not help to solve that serious real-world problem for the\nend-user. IMHO, telling a user to not use non-US-ASCII characters in file\nnames to stay platform-independent seems not to be state-of-the-art and\nwould exclude a lot of users world-wide. Finally, everyone would expect Git\nto be better than CVS, also at this point.\n\nBut what about getting it working \"somehow\" on OS X in a few minutes? What\nshould I do to be able to stage/commit/work with files containing umlauts in\ntheir name on my English OS X (by specifying the file names) as it seems to\nwork magically on a German OS X? Is this topic already /documented/\nsomewhere (I couldn't find something)?\n\nThanks in advance,\nTom\n\n\nJohannes Schindelin wrote:\n> Hi,\n> \n> On Mon, 23 Nov 2009, Thomas Singer wrote:\n> \n>> Basically, getting it \"somehow\" to work on OS X is just one minor step. \n>> IMHO Git should standardize on file names in the repository and do the \n>> platform-specific conversion independent of any locale setting, if \n>> needed.\n> \n> That is contrary to the design of Git which honors content (byte-wise!) as \n> much as possible, and treats file names very much as content.\n> \n> There were beginnings of supporting OSX' brain-damaged filename mangling, \n> but an obnoxious OSX fan worked very hard on trying to defend the OSX \n> design and to decry Git's respect for the raw bytes on this list, so hard \n> that even the nicest developers had no fun working on this issue anymore.\n> \n> This little background may help you understand why there is no solution \n> implemented in Git yet.  And maybe quite a few developers are reluctant to \n> discuss the issue and possible solutions due to said sad story, too.\n> \n> Ciao,\n> Dscho\n> --\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n> \n> \n"},{"id":"128212","messageId":"m3pr78bywe.fsf@localhost.localdomain","threadId":"21727","inReplyTo":"alpine.DEB.1.00.0911231916510.4897@intel-tinevez-2-302","subject":"Re: OS X and umlauts in file names","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-11-23T23:31:52Z","receivedAt":"2009-11-23T23:31:52Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Mon, 23 Nov 2009, Thomas Singer wrote:\n> \n> > Basically, getting it \"somehow\" to work on OS X is just one minor step. \n> > IMHO Git should standardize on file names in the repository and do the \n> > platform-specific conversion independent of any locale setting, if \n> > needed.\n> \n> That is contrary to the design of Git which honors content (byte-wise!) as \n> much as possible, and treats file names very much as content.\n> \n> There were beginnings of supporting OSX' brain-damaged filename mangling, \n> but an obnoxious OSX fan worked very hard on trying to defend the OSX \n> design and to decry Git's respect for the raw bytes on this list, so hard \n> that even the nicest developers had no fun working on this issue anymore.\n> \n> This little background may help you understand why there is no solution \n> implemented in Git yet.  And maybe quite a few developers are reluctant to \n> discuss the issue and possible solutions due to said sad story, too.\n\nTo be more exact the problem is not that MacOS X uses denormalized\nform (does file mangling).  This would be the problem only in\ncross-platform development (where some developers would work from\ndifferent operating system).\n\nThe problem is that the name under which Git creates file is different\nfrom the name MacOS X lists file (in readdir etc.).\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"128288","messageId":"4B0CEFCA.5020605@syntevo.com","threadId":"21727","inReplyTo":"alpine.LNX.2.00.0911231403100.14365@iabervon.org","subject":"Re: OS X and umlauts in file names","fromName":"Thomas Singer","fromEmail":"thomas.singer@syntevo.com","sentAt":"2009-11-25T08:50:18Z","receivedAt":"2009-11-25T08:50:18Z","isPatch":false,"sender":{"key":"thomas.singer@syntevo.com","avatar":null},"body":"I've did following:\n\n toms-mac-mini:git-umlauts tom$ ls\n Überlänge.txt\n toms-mac-mini:git-umlauts tom$ git status\n # On branch master\n #\n # Initial commit\n #\n # Changes to be committed:\n #   (use \"git rm --cached <file>...\" to unstage)\n #\n  #\tnew file:   \"U\\314\\210berla\\314\\210nge.txt\"\n #\n toms-mac-mini:git-umlauts tom$ git stage \"U\\314\\210berla\\314\\210nge.txt\"\n fatal: pathspec 'U\\314\\210berla\\314\\210nge.txt' did not match any files\n\nNote, that I copy-pasted the file name which 'git status' showed to the\nstage command. IMHO, this should work, especially, because different people\nsaid Git would treat the file name as byte-array without interpreting it in\nsome kind.\n\nFrom the user with the German OS X (for which the staging is said to work),\nI've got the output of 'env' and hence also tried\n\n export LANG=de_DE.UTF-8\n\nbefore doing the above steps, but with the same results. :(\n\n-- \nTom\n\n\nDaniel Barkalow wrote:\n> On Mon, 23 Nov 2009, Thomas Singer wrote:\n> \n>> I'm on an English OS X 10.6.2 and I created a sample file with umlauts in\n>> its name (Überlänge.txt). When I try to stage the file in the terminal, I\n>> can't complete the file name by typing the Ü and hitting the tab key, but I\n>> can complete it by typing an U and hitting the tab key.\n> \n> You've already got a bug before involving git at all. You create a \n> file \"Überlänge.txt\", but OS X writes \"U:berla:nge.txt\" (typing the \n> combining character umlaut as : so that you can see the difference), and \n> the directory listing doesn't contain any files that start with Ü, so the \n> terminal already can't find the file you created. Obviously, git is going \n> to have all the problems that the OS-provided readline library has, and \n> you're not going to be able to get predictable results in any case where \n> user-supplied filenames are compared with directory listings.\n> \n> Part of the problem is that OS X does a canonicalization that is not what \n> anybody else does, so you hit the problem every single time, but the \n> fundamental issue is that there isn't any way to tell, when you create a \n> file, what name that file will be listed under.\n> \n> Note that this isn't a matter of characters to byte sequences. OS X \n> actually uses different characters for the filename in its listings than \n> you've used.\n> \n> If there's a difference between German and English versions, I suspect \n> that it's actually that you're not using a German keyboard with a key \n> that, under OS X, produces the two-character sequence U:, but using some \n> method that produces the single character Ü. I'd guess that your SmartGit \n> problem is that Java is converting the U: that the user typed into Ü, and \n> passing it to the OS, which turns it back into U: and then doesn't list \n> the file that Java thinks the user asked for.\n> \n> \t-Daniel\n> *This .sig left intentionally blank*\n"},{"id":"128289","messageId":"28c656e20911250151v7b89e5f8pa15aa2bd7d5f96d@mail.gmail.com","threadId":"21727","inReplyTo":"4B0CEFCA.5020605@syntevo.com","subject":"Re: OS X and umlauts in file names","fromName":"B Smith-Mannschott","fromEmail":"bsmith.occs@gmail.com","sentAt":"2009-11-25T09:51:48Z","receivedAt":"2009-11-25T09:51:48Z","isPatch":false,"sender":{"key":"bsmith.occs@gmail.com","avatar":"https://gravatar.com/avatar/46449e07c27bb8a30e4d50c08859f7210d47f6e84526b0a3b903641231dfc1bd?d=mp&s=160"},"body":"On Wed, Nov 25, 2009 at 09:50, Thomas Singer <thomas.singer@syntevo.com> wrote:\n> I've did following:\n>\n>  toms-mac-mini:git-umlauts tom$ ls\n>  Überlänge.txt\n>  toms-mac-mini:git-umlauts tom$ git status\n>  # On branch master\n>  #\n>  # Initial commit\n>  #\n>  # Changes to be committed:\n>  #   (use \"git rm --cached <file>...\" to unstage)\n>  #\n>  #     new file:   \"U\\314\\210berla\\314\\210nge.txt\"\n>  #\n>  toms-mac-mini:git-umlauts tom$ git stage \"U\\314\\210berla\\314\\210nge.txt\"\n>  fatal: pathspec 'U\\314\\210berla\\314\\210nge.txt' did not match any files\n>\n> Note, that I copy-pasted the file name which 'git status' showed to the\n> stage command. IMHO, this should work, especially, because different people\n> said Git would treat the file name as byte-array without interpreting it in\n> some kind.\n>\n> From the user with the German OS X (for which the staging is said to work),\n> I've got the output of 'env' and hence also tried\n>\n>  export LANG=de_DE.UTF-8\n>\n> before doing the above steps, but with the same results. :(\n\nThe problem you are having is not because of the *encoding*, it's the\nNormalization form that's messing things up. The fact is that in\nUnicode there are two ways to represent many -- but not all --\naccented characters.\n\n- \"composed\": one code point for the accented character)\n- \"decomposed\": two code points: one for the base letter, one or more\ncombining characters for the accents.\n\nThe composed code points are really just backward compatibility to\nlegacy encodings (like LATIN-1). If you want to actually support\n(rather than just tolerate) unicode you have to know how to deal with\nthe decomposed form, and once you can do that there's little point\nbeyond backward compatibility in continuing to use composed form\ninternally.\n\nThe Subversion people have run into this same problem because they\nmade the same error of assuming that any given sequence of glyphs has\nonly one possible representation as unicode code points and thus only\none representation as UTF-8 bytes. Dionisos has done written up the\nissues involved here:\n\nhttp://svn.apache.org/repos/asf/subversion/trunk/notes/unicode-composition-for-filenames\n\n// Ben\n"},{"id":"128290","messageId":"46a038f90911250207o214b3952s67a022a017dbe2d9@mail.gmail.com","threadId":"21727","inReplyTo":"4B0CEFCA.5020605@syntevo.com","subject":"Re: OS X and umlauts in file names","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2009-11-25T10:07:29Z","receivedAt":"2009-11-25T10:07:29Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Wed, Nov 25, 2009 at 9:50 AM, Thomas Singer\n<thomas.singer@syntevo.com> wrote:\n>  toms-mac-mini:git-umlauts tom$ git stage \"U\\314\\210berla\\314\\210nge.txt\"\n>  fatal: pathspec 'U\\314\\210berla\\314\\210nge.txt' did not match any files\n\ndoes a find * | xargs git add work?\n\ncheers,\n\n\nm\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- School Server Architect\n - ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"128294","messageId":"46a038f90911250219p54badb6era2177e2f6484f6d9@mail.gmail.com","threadId":"21727","inReplyTo":"46a038f90911250207o214b3952s67a022a017dbe2d9@mail.gmail.com","subject":"Re: OS X and umlauts in file names","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2009-11-25T10:19:56Z","receivedAt":"2009-11-25T10:19:56Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Wed, Nov 25, 2009 at 11:07 AM, Martin Langhoff\n<martin.langhoff@gmail.com> wrote:\n> On Wed, Nov 25, 2009 at 9:50 AM, Thomas Singer\n> <thomas.singer@syntevo.com> wrote:\n>>  toms-mac-mini:git-umlauts tom$ git stage \"U\\314\\210berla\\314\\210nge.txt\"\n>>  fatal: pathspec 'U\\314\\210berla\\314\\210nge.txt' did not match any files\n>\n> does a find * | xargs git add work?\n\nAlso, you can try with `find * -print0 | git-update-index --add\n--stdin -z `. Find should report the exact filename that the OS has,\nand git should add it as it is.\n\nBackground: git-add used to be a trivial shell script wrapping around\ngit-update-index. If you have a git checkout, try:\n\n git show f25933987f29070e9cd79dfddf03018010e82e80:git-add.sh\n\nIf git cannot track this file in a pure OSX world, there is a good\nchance it's a bug in git.\n\nIn in this narrow test case (single machine, running OSX) git *must*\nbe able to do the right thing. If you work on multi-platform projects\nhowever, there is a good chance a Windows or Linux user will commit a\nfile with a name that _when you checkout on OSX_, OSX will save with a\ndifferent (but \"equivalent\") name due to its funny decomposition\nrules. And all sorts of \"fun\" will ensue.\n\ncheers,\n\n\nm\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- School Server Architect\n - ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"128359","messageId":"m21vjmkyxh.fsf@igel.home","threadId":"21727","inReplyTo":"4B0CEFCA.5020605@syntevo.com","subject":"Re: OS X and umlauts in file names","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2009-11-25T22:43:54Z","receivedAt":"2009-11-25T22:43:54Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"Thomas Singer <thomas.singer@syntevo.com> writes:\n\n> I've did following:\n>\n>  toms-mac-mini:git-umlauts tom$ ls\n>  Überlänge.txt\n>  toms-mac-mini:git-umlauts tom$ git status\n>  # On branch master\n>  #\n>  # Initial commit\n>  #\n>  # Changes to be committed:\n>  #   (use \"git rm --cached <file>...\" to unstage)\n>  #\n>   #\tnew file:   \"U\\314\\210berla\\314\\210nge.txt\"\n>  #\n>  toms-mac-mini:git-umlauts tom$ git stage \"U\\314\\210berla\\314\\210nge.txt\"\n>  fatal: pathspec 'U\\314\\210berla\\314\\210nge.txt' did not match any files\n\nTry $'U\\314\\210berla\\314\\210nge.txt' instead.\n\"U\\314\\210berla\\314\\210nge.txt\" is the same as\n\"U\\\\314\\\\210berla\\\\314\\\\210nge.txt\" to the shell.\n\nAndreas.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5\n\"And now for something completely different.\"\n"},{"id":"128445","messageId":"4B0E3C14.9070404@syntevo.com","threadId":"21727","inReplyTo":"m21vjmkyxh.fsf@igel.home","subject":"Re: OS X and umlauts in file names","fromName":"Thomas Singer","fromEmail":"thomas.singer@syntevo.com","sentAt":"2009-11-26T08:28:04Z","receivedAt":"2009-11-26T08:28:04Z","isPatch":false,"sender":{"key":"thomas.singer@syntevo.com","avatar":null},"body":"Hi Andreas,\n\nThank you for this hint. When trying\n\n toms-mac-mini:git-umlauts tom$ git stage $'U\\314\\210berla\\314\\210nge.txt'\n\ngit shows me no error or other output, but invoking 'git status' again shows\nno difference, the file is still showing up as new file.\n\nI've also tried to use double backslashes, but I could not enter a backslash\nin the OS X Terminal (works fine in other applications). :(\n\n-- \nTom\n\nAndreas Schwab wrote:\n> Thomas Singer <thomas.singer@syntevo.com> writes:\n> \n>> I've did following:\n>>\n>>  toms-mac-mini:git-umlauts tom$ ls\n>>  Überlänge.txt\n>>  toms-mac-mini:git-umlauts tom$ git status\n>>  # On branch master\n>>  #\n>>  # Initial commit\n>>  #\n>>  # Changes to be committed:\n>>  #   (use \"git rm --cached <file>...\" to unstage)\n>>  #\n>>   #\tnew file:   \"U\\314\\210berla\\314\\210nge.txt\"\n>>  #\n>>  toms-mac-mini:git-umlauts tom$ git stage \"U\\314\\210berla\\314\\210nge.txt\"\n>>  fatal: pathspec 'U\\314\\210berla\\314\\210nge.txt' did not match any files\n> \n> Try $'U\\314\\210berla\\314\\210nge.txt' instead.\n> \"U\\314\\210berla\\314\\210nge.txt\" is the same as\n> \"U\\\\314\\\\210berla\\\\314\\\\210nge.txt\" to the shell.\n> \n> Andreas.\n> \n"},{"id":"128481","messageId":"76718490911260923l1d22012cyf62904d14cde4198@mail.gmail.com","threadId":"21727","inReplyTo":"4B0ABA42.1060103@syntevo.com","subject":"Re: OS X and umlauts in file names","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2009-11-26T17:23:19Z","receivedAt":"2009-11-26T17:23:19Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Mon, Nov 23, 2009 at 11:37 AM, Thomas Singer\n<thomas.singer@syntevo.com> wrote:\n> I'm on an English OS X 10.6.2 and I created a sample file with umlauts in\n> its name (Überlänge.txt). When I try to stage the file in the terminal, I\n> can't complete the file name by typing the Ü and hitting the tab key, but I\n> can complete it by typing an U and hitting the tab key. Unfortunately, after\n> executing\n>\n>  git stage Überlänge.txt\n>\n> I invoked\n>\n>  git status\n>\n> and it still shows the file as new file. Should I set some environment\n> variable to be able to work with files containing umlauts in the name?\n\nWorks for me on 10.6.2:\n\nkore:~/foo (master)$ echo Überlänge.txt > Überlänge.txt\nkore:~/foo (master)$ git stage Überlänge.txt\nkore:~/foo (master)$ git st\n# On branch master\n#\n# Initial commit\n#\n# Changes to be committed:\n#   (use \"git rm --cached <file>...\" to unstage)\n#\n#\tnew file:   \"U\\314\\210berla\\314\\210nge.txt\"\n#\nkore:~/foo (master)$ git commit -m initial\n[master (root-commit) f23e23f] initial\n 1 files changed, 1 insertions(+), 0 deletions(-)\n create mode 100644 \"U\\314\\210berla\\314\\210nge.txt\"\nkore:~/foo (master)$ git st\n# On branch master\nnothing to commit (working directory clean)\n\nDoesn't matter whether LANG and/or LC_* are set or not for me.\n\nj.\n"},{"id":"128482","messageId":"76718490911260927h9ff796bgbebcccab7e52ffbe@mail.gmail.com","threadId":"21727","inReplyTo":"4B0CEFCA.5020605@syntevo.com","subject":"Re: OS X and umlauts in file names","fromName":"Jay Soffian","fromEmail":"jaysoffian@gmail.com","sentAt":"2009-11-26T17:27:36Z","receivedAt":"2009-11-26T17:27:36Z","isPatch":false,"sender":{"key":"jaysoffian@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155970?v=4"},"body":"On Wed, Nov 25, 2009 at 3:50 AM, Thomas Singer\n<thomas.singer@syntevo.com> wrote:\n> I've did following:\n>\n>  toms-mac-mini:git-umlauts tom$ ls\n>  Überlänge.txt\n>  toms-mac-mini:git-umlauts tom$ git status\n>  # On branch master\n>  #\n>  # Initial commit\n>  #\n>  # Changes to be committed:\n>  #   (use \"git rm --cached <file>...\" to unstage)\n>  #\n>  #     new file:   \"U\\314\\210berla\\314\\210nge.txt\"\n>  #\n\nWait, what's the problem here? It's staged according to the above,\njust commit it.\n\nj.\n"},{"id":"128554","messageId":"4B0FA388.4030507@syntevo.com","threadId":"21727","inReplyTo":"76718490911260927h9ff796bgbebcccab7e52ffbe@mail.gmail.com","subject":"Re: OS X and umlauts in file names","fromName":"Thomas Singer","fromEmail":"thomas.singer@syntevo.com","sentAt":"2009-11-27T10:01:44Z","receivedAt":"2009-11-27T10:01:44Z","isPatch":false,"sender":{"key":"thomas.singer@syntevo.com","avatar":null},"body":"Jay Soffian wrote:\n>>  toms-mac-mini:git-umlauts tom$ git status\n>>  # On branch master\n>>  #\n>>  # Initial commit\n>>  #\n>>  # Changes to be committed:\n>>  #   (use \"git rm --cached <file>...\" to unstage)\n>>  #\n>>  #     new file:   \"U\\314\\210berla\\314\\210nge.txt\"\n>>  #\n> \n> Wait, what's the problem here? It's staged according to the above,\n> just commit it.\n\nYou are completely right and I feel quite foolish.\n\nWhat about this one:\n\ntoms-mac-mini:git-umlauts tom$ git status\n# On branch master\n#\n# Initial commit\n#\n# Changes to be committed:\n#   (use \"git rm --cached <file>...\" to unstage)\n#\n#\tnew file:   \"U\\314\\210berla\\314\\210nge.txt\"\n#\ntoms-mac-mini:git-umlauts tom$ git rm --cached \"U\\314\\210berla\\314\\210nge.txt\"\nfatal: pathspec 'U\\314\\210berla\\314\\210nge.txt' did not match any files\n\n-- \nThanks in advance,\nTom\n"},{"id":"128556","messageId":"4B0FA7D7.1050302@syntevo.com","threadId":"21727","inReplyTo":"4B0FA388.4030507@syntevo.com","subject":"Re: OS X and umlauts in file names","fromName":"Thomas Singer","fromEmail":"thomas.singer@syntevo.com","sentAt":"2009-11-27T10:20:07Z","receivedAt":"2009-11-27T10:20:07Z","isPatch":false,"sender":{"key":"thomas.singer@syntevo.com","avatar":null},"body":"Thomas Singer wrote:\n> Jay Soffian wrote:\n>>>  toms-mac-mini:git-umlauts tom$ git status\n>>>  # On branch master\n>>>  #\n>>>  # Initial commit\n>>>  #\n>>>  # Changes to be committed:\n>>>  #   (use \"git rm --cached <file>...\" to unstage)\n>>>  #\n>>>  #     new file:   \"U\\314\\210berla\\314\\210nge.txt\"\n>>>  #\n>> Wait, what's the problem here? It's staged according to the above,\n>> just commit it.\n> \n> You are completely right and I feel quite foolish.\n> \n> What about this one:\n> \n> toms-mac-mini:git-umlauts tom$ git status\n> # On branch master\n> #\n> # Initial commit\n> #\n> # Changes to be committed:\n> #   (use \"git rm --cached <file>...\" to unstage)\n> #\n> #\tnew file:   \"U\\314\\210berla\\314\\210nge.txt\"\n> #\n> toms-mac-mini:git-umlauts tom$ git rm --cached \"U\\314\\210berla\\314\\210nge.txt\"\n> fatal: pathspec 'U\\314\\210berla\\314\\210nge.txt' did not match any files\n\nOK, I've found it. This works (I have to complete the file name after having\ntyped an U):\n\ntoms-mac-mini:git-umlauts tom$ git rm --cached Überlänge.txt\n\n-- \nTom\n"},{"id":"128559","messageId":"46a038f90911270256w57487e6cq9bda8b98a5384799@mail.gmail.com","threadId":"21727","inReplyTo":"4B0FA7D7.1050302@syntevo.com","subject":"Re: OS X and umlauts in file names","fromName":"Martin Langhoff","fromEmail":"martin.langhoff@gmail.com","sentAt":"2009-11-27T10:56:25Z","receivedAt":"2009-11-27T10:56:25Z","isPatch":false,"sender":{"key":"martin.langhoff@gmail.com","avatar":"https://gravatar.com/avatar/1e3f311b6c4c15836501901ca58f8c0b0667246488084ba524d8bc9867e22fd9?d=mp&s=160"},"body":"On Fri, Nov 27, 2009 at 11:20 AM, Thomas Singer\n<thomas.singer@syntevo.com> wrote:\n>> toms-mac-mini:git-umlauts tom$ git rm --cached \"U\\314\\210berla\\314\\210nge.txt\"\n>> fatal: pathspec 'U\\314\\210berla\\314\\210nge.txt' did not match any files\n>\n> OK, I've found it. This works (I have to complete the file name after having\n> typed an U):\n>\n> toms-mac-mini:git-umlauts tom$ git rm --cached Überlänge.txt\n\nTom,\n\nhave you tried calling git-update-index --add\n--stdin -z? Your original email stated\n\n> we've got a problem report regarding our SmartGit GUI client\n\nso it sounds like you are building a porcelain. In that case, the\nsanest approach is to invoke git-update-index and write to its stdin.\n\ncheers,\n\n\n\nm\n-- \n martin.langhoff@gmail.com\n martin@laptop.org -- School Server Architect\n - ask interesting questions\n - don't get distracted with shiny stuff  - working code first\n - http://wiki.laptop.org/go/User:Martinlanghoff\n"},{"id":"128590","messageId":"4B101C06.1030300@syntevo.com","threadId":"21727","inReplyTo":"46a038f90911270256w57487e6cq9bda8b98a5384799@mail.gmail.com","subject":"Re: OS X and umlauts in file names","fromName":"Thomas Singer","fromEmail":"thomas.singer@syntevo.com","sentAt":"2009-11-27T18:35:50Z","receivedAt":"2009-11-27T18:35:50Z","isPatch":false,"sender":{"key":"thomas.singer@syntevo.com","avatar":null},"body":"Martin Langhoff wrote:\n> have you tried calling git-update-index --add\n> --stdin -z? Your original email stated\n\nNo, we don't do such a massive change immediately before a release.\n\n>> we've got a problem report regarding our SmartGit GUI client\n> \n> so it sounds like you are building a porcelain. In that case, the\n> sanest approach is to invoke git-update-index and write to its stdin.\n\nWe will try this out after release.\n\nFor those who are interested: I've got it working on OS X and Git was not\nthe problem, but Java. A longer time ago directory.list() or\ndirectory.listFiles() returned the file names with decomposed characters (as\nthey are stored on OS X hard disk). Now (don't know which Java update\nintroduced this change) these methods return file names with composed\ncharacters, so I had to decompose them before handing them to the git\nexecutable call.\n\nNevertheless, the cross-platform-problem remains: if you add files with\numlauts in their names on non-OS X, you will not be able to use them on OS X.\n\n-- \nTom\n"}]}