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

Issue with 'git diff' and non ascii characters

From
GSGiulio Cesare Solaroli <giulio.cesare@solaroli.it>
Date
Sep 12, 2014, 06:53 UTC
Message-ID
<5DEE05EE-B302-44D1-9B1D-0B475EF4E96B@solaroli.it>
Hello,

I have spotted a problem using 'git diff' when non ascii characters are involved. Not sure if the problem is due to the name of the file, or its content.

Cheers,
Giulio Cesare
Steps to reproduce the problem:
$ sw_vers
ProductName:	Mac OS X
ProductVersion:	10.9.4
BuildVersion:	13E28
$ git --version
git version 1.8.5.2 (Apple Git-48)
$ mkdir test
$ cd test
$ echo prova > tèst.md
$ git init
Initialized empty Git repository in /private/tmp/test/.git/
$ git add *
$ git commit -m "first commit"
[master (root-commit) ebbe2a3] first commit
 1 file changed, 1 insertion(+)
 create mode 100644 "t\303\250st.md"
$ echo provà > tèst.md 
$ git status
On branch master
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
	modified:   "t\303\250st.md"

no changes added to commit (use "git add" and/or "git commit -a") $ git diff tèst.md $

Next: Torsten Bögershausen
Message 1 of 2 in “Issue with 'git diff' and non ascii characters”
  1. Giulio Cesare SolaroliSep 12, 2014
  2. Torsten BögershausenSep 12, 2014

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.