git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joey Hess <joey@kitenet.net>
To: Git Mailing List <git@vger.kernel.org>
Subject: git log and utf-u in filenames
Date: Thu, 25 Sep 2008 17:50:02 -0400	[thread overview]
Message-ID: <20080925215002.GA30810@kodama.kitenet.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 1373 bytes --]

Git, particularly git-log seems to not display utf-8 characters in filenames,
instead showing an escaped representation. On the other hand, commit messages,
as git-log(1) notes, are assumed to be utf-8, and the same utf-8 character
used in a commit message is not escaped, and displays ok.

Can anyone point me at the documentation for this utf-8 filename escaping,
assuming it's not a bug? And did earlier versions of git (circa 2006) perhaps
not do that escaping? I have code in ikiwiki that apparently used to work, but
is certianly not working with current git, due to this escaping.

Here's an example of the inconsistent handling of the same utf-8 character
("ö") in commit messages and filenames.

joey@kodama:~/tmp>mkdir utf8; cd utf8; git-init
Initialized empty Git repository in /home/joey/tmp/utf8/.git/
joey@kodama:~/tmp/utf8>echo hi > ö
joey@kodama:~/tmp/utf8>git add ö; git commit -m 'adding file: ö'
Created initial commit ee7d809: adding file: ö
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 "\303\266"
joey@kodama:~/tmp/utf-8>git log --stat
commit ee7d809d1811b1e1ad485ce3e7274316257029ae
Author: Joey Hess <joey@kodama.kitenet.net>
Date:   Thu Sep 25 17:34:10 2008 -0400
       
          adding file: ö
       
 "\303\266" |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

-- 
see shy jo

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

             reply	other threads:[~2008-09-25 21:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-25 21:50 Joey Hess [this message]
2008-09-25 22:43 ` git log and utf-u in filenames Joey Hess
2008-09-25 23:15   ` Jakub Narebski
2008-09-26  6:33     ` Alex Riesen
2008-09-26  7:31       ` Jakub Narebski
2008-09-26 13:49         ` Alex Riesen
2008-09-27  8:37           ` Jakub Narebski
2008-09-25 23:11 ` Jakub Narebski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080925215002.GA30810@kodama.kitenet.net \
    --to=joey@kitenet.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).