{"thread":{"id":"39689","subject":"[Question] Is it normal for accented characters to be shown as decomposed Unicode on GNU/Linux?","startedAt":"2015-06-22T13:17:40Z","lastAt":"2015-06-22T16:13:40Z","messageCount":3,"participants":["Bastien Traverse","Charles Bailey"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"264511","messageId":"55880AF4.4000206@traverse.email","threadId":"39689","inReplyTo":null,"subject":"[Question] Is it normal for accented characters to be shown as decomposed Unicode on GNU/Linux?","fromName":"Bastien Traverse","fromEmail":"bastien@traverse.email","sentAt":"2015-06-22T13:17:40Z","receivedAt":"2015-06-22T13:17:40Z","isPatch":false,"sender":{"key":"bastien@traverse.email","avatar":null},"body":"Hi everybody,\n\nI have a repository where some files and folders contain accented\ncharacters due to being in French. Such names include \"rêve\" (dream),\n\"réunion\" (meeting) etc.\n\nWhether already in version control or not, git tools only show their\n*decomposed* representation (I use a UTF-8 locale, see below), but don't\naccept those representations as input (and auto-completion is broken for\nthose), which is a bit misleading (test case follows).\n\nI've seen the threads about accented characters on OSX and the use of\n'core.precomposeunicode', but as I'm running on GNU/Linux I thought this\nshouldn't apply.\n\nSince I've already had a problem in git with a weirdly encoded character\n(see http://thread.gmane.org/gmane.comp.version-control.git/269710), I\nwanted to get some feedback to determine whether my setup was the cause\nof it or if it was normal to see decomposed file names in git. I found\nin man git-status:\n\n> If a filename contains whitespace or other nonprintable\n> characters, that field will be quoted in the manner of a C string\n> literal: surrounded by ASCII double quote (34) characters, and with\n> interior special characters backslash-escaped.\n\nSo do everybody using accented characters see those in decomposed form\nin git? And if so why some softwares built on top of it (like gitit [1])\ndon't inherit those decomposed representations?\n\n[1] http://gitit.net/\n\nThanks!\n\n---\ntest case:\n$ mkdir accent-test && cd !$\n$ git init\n$ touch rêve réunion\n$ git status\nOn branch master\n\nInitial commit\n\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n\n\t\"r\\303\\251union\"\n\t\"r\\303\\252ve\"\n$ git add .\n$ git commit -m \"accent test\"\n[master (root commit) 0d776b7] accent test\n 2 files changed, 0 insertions(+), 0 deletions(-)\n create mode 100644 \"r\\303\\251union\"\n create mode 100644 \"r\\303\\252ve\"\n$ git log --summary\ncommit 0d776b7a09d5384a76066999431507018e292efe\nAuthor: Bastien Traverse <bastien@traverse.email>\nDate:   2015-06-22 14:13:46 +0200\n\n    accent test\n\n create mode 100644 \"r\\303\\251union\"\n create mode 100644 \"r\\303\\252ve\"\n$ mv rêve reve\n$ git status\nOn branch master\nChanges not staged for commit:\n  (use \"git add/rm <file>...\" to update what will be committed)\n  (use \"git checkout -- <file>...\" to discard changes in working directory)\n\n\tdeleted:    \"r\\303\\252ve\"\n\nUntracked files:\n  (use \"git add <file>...\" to include in what will be committed)\n\n\treve\n\nno changes added to commit (use \"git add\" and/or \"git commit -a\")\n$ git add [[TAB-TAB]]\n\"r\\303\\252ve\"  reve\n$ git add \"[[TAB]] --> git add \"\\\"r\\\\303\\\\252ve\\\"\"\nfatal: pathspec '\"r\\303\\252ve\"' did not match any files\n$ git add \"r\\303\\252ve\"\nfatal: pathspec 'r\\303\\252ve' did not match any files\n$ git add rêve reve OR git add .\n$ git status\nOn branch master\nChanges to be committed:\n  (use \"git reset HEAD <file>...\" to unstage)\n\n\trenamed:    \"r\\303\\252ve\" -> reve\n\nI'm running an up-to-date Arch linux with following software versions\nand locale config:\n\n$ uname -a\nLinux xxx 4.0.5-1-ARCH #1 SMP PREEMPT Sat Jun 6 18:37:49 CEST 2015\nx86_64 GNU/Linux\n$ bash --version\nGNU bash, version 4.3.39(1)-release (x86_64-unknown-linux-gnu)\n$ git --version\ngit version 2.4.3\n$ locale\nLANG=fr_FR.utf8\nLC_CTYPE=\"fr_FR.utf8\"\nLC_NUMERIC=fr_FR.utf8\nLC_TIME=fr_FR.utf8\nLC_COLLATE=\"fr_FR.utf8\"\nLC_MONETARY=fr_FR.utf8\nLC_MESSAGES=\"fr_FR.utf8\"\nLC_PAPER=fr_FR.utf8\nLC_NAME=\"fr_FR.utf8\"\nLC_ADDRESS=\"fr_FR.utf8\"\nLC_TELEPHONE=\"fr_FR.utf8\"\nLC_MEASUREMENT=fr_FR.utf8\nLC_IDENTIFICATION=\"fr_FR.utf8\"\nLC_ALL=\n$ localectl\n   System Locale: LANG=fr_FR.UTF8\n       VC Keymap: fr\n      X11 Layout: fr\n     X11 Variant: oss\n\nCheers\n"},{"id":"264541","messageId":"20150622150428.GA14100@hashpling.org","threadId":"39689","inReplyTo":"55880AF4.4000206@traverse.email","subject":"Re: [Question] Is it normal for accented characters to be shown as decomposed Unicode on GNU/Linux?","fromName":"Charles Bailey","fromEmail":"charles@hashpling.org","sentAt":"2015-06-22T15:04:28Z","receivedAt":"2015-06-22T15:04:28Z","isPatch":false,"sender":{"key":"charles@hashpling.org","avatar":"https://avatars.githubusercontent.com/u/1668475?v=4"},"body":"On Mon, Jun 22, 2015 at 03:17:40PM +0200, Bastien Traverse wrote:\n> test case:\n> $ mkdir accent-test && cd !$\n> $ git init\n> $ touch rêve réunion\n> $ git status\n> On branch master\n> \n> Initial commit\n> \n> Untracked files:\n>   (use \"git add <file>...\" to include in what will be committed)\n> \n> \t\"r\\303\\251union\"\n> \t\"r\\303\\252ve\"\n\nNote that these aren't \"decomposed\" (in the unicode decomposition\nsense) but are merely octal escaped representations of the utf-8\nencoded file names.\n\nMy understanding that this is normal and probably dates back (at least\nfor status as far as:\n\n\tcommit a734d0b10bd0f5554abb3acdf11426040cfc4df0\n\tAuthor: Dmitry Potapov <dpotapov@gmail.com>\n\tDate:   Fri Mar 7 05:30:58 2008 +0300\n\n\tMake private quote_path() in wt-status.c available as\nquote_path_relative()\n\n\t[...]\n\nThe behaviour can be changed by setting the git config variable\n\"core.quotePath\" to false.\n"},{"id":"264567","messageId":"55883434.8040406@traverse.email","threadId":"39689","inReplyTo":"20150622150428.GA14100@hashpling.org","subject":"Re: [Question] Is it normal for accented characters to be shown as decomposed Unicode on GNU/Linux?","fromName":"Bastien Traverse","fromEmail":"bastien@traverse.email","sentAt":"2015-06-22T16:13:40Z","receivedAt":"2015-06-22T16:13:40Z","isPatch":false,"sender":{"key":"bastien@traverse.email","avatar":null},"body":"Le 22/06/2015 17:04, Charles Bailey a écrit :\n> Note that these aren't \"decomposed\" (in the unicode decomposition\n> sense) but are merely octal escaped representations of the utf-8\n> encoded file names.\n\nThanks, I had read that term in similar context (German umlaut) and\nthought it was correctly describing the phenomenon. Key words \"octal\nescape\" return more precise results :)\n\n> My understanding that this is normal and probably dates back (at least\n> for status as far as:\n> \n> \tcommit a734d0b10bd0f5554abb3acdf11426040cfc4df0\n> \tAuthor: Dmitry Potapov <dpotapov@gmail.com>\n> \tDate:   Fri Mar 7 05:30:58 2008 +0300\n> \n> \tMake private quote_path() in wt-status.c available as\n> quote_path_relative()\n> \n> \t[...]\n> \n> The behaviour can be changed by setting the git config variable\n> \"core.quotePath\" to false.\n\nThis is awesome, thank you. Indeed I just tried my test case with this\nconfig option set to false and accented characters appear normally.\n\nThank you!\n"}]}