Git: 2.11.1 breaks log output for non-ASCII characters (e.g. German Umlauts)

Created on 8 Feb 2017  路  11Comments  路  Source: git-for-windows/git

  • [ X ] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? 64-bit
$ git --version --build-options
git version 2.11.1.windows.1
built from commit: 1c1842bcba45569a84112ec64f72b08eb2d57c68
sizeof-long: 4
machine: x86_64
  • Which version of Windows are you running? 8.1 64-bit?
$ cmd.exe /c ver
Microsoft Windows [Version 6.3.9600]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
Path Option: Cmd
SSH Option: OpenSSH
CRLF Option: CRLFCommitAsIs
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled
Enable Builtin Difftool: Disabled
(same as in 2.11.0)
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

German Windows

gitconfig contains

[i18n]
    logoutputencoding = Windows-1252

which used to work in 2.11.0 and does not in 2.11.1

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

PowerShell

git log --oneline
  • What did you expect to occur after running these commands?

before

  • What actually happened instead?

after

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?
git init
echo "testfile" > b盲盲盲盲.txt
git add .
git commit -m "a盲 o枚 u眉 s脽 - all broken now"
git log --oneline --stat

prerelease

Most helpful comment

@Snaptags Try export LC_ALL=de_DE. Also make sure your logoutputencoding, your locale settings and mintty text settings (set Options->Text->Character set to CP1252) all match.

All 11 comments

I believe Issue #945 and its compatriots covers this. the latest prerelease includes a fix. https://github.com/git-for-windows/git/releases/tag/v2.11.1.windows-prerelease.2 (the sort order on the release page doesn't quite get it right ;-)

Also check for your LC settings.

No, not really. The prerelease behaves exactly like the release
git version 2.11.1.windows.prerelease.2
built from commit: 86d49ccac7afb39e03ba2632803c5ab67d4bb792
sizeof-long: 4
machine: x86_64

Tried to set LC_ALL=C, does not make any difference either

Tried some older versions, the issue must have been introduced somewhere between
git version 2.11.0.windows.1 (does not print a commit id) and
git version 2.11.0.windows.2 (not working any more)
built from commit: 9e46438a63c7991eb394fb752fa0ccf2eb63e248

Note beyond: maybe the file name output never worked correctly, did not notice that, because we don't use non-ascii characters for file names :-)

filename

@Snaptags Try export LC_ALL=de_DE. Also make sure your logoutputencoding, your locale settings and mintty text settings (set Options->Text->Character set to CP1252) all match.

Setting an environment variable LC_ALL with content de_DE seems to fix the issue, thanks a lot!

@Snaptags That's good news! If you want to see your paths as well, try git config core.quotepath off, characters outside the ASCII range get quoted by default.

filename
That's just differently wrong :-)
But I hardly have any file names with non ASCII-characters, so I don't care :-)

Ah, yes, of course, the path is UTF-8 and you're using Windows-1252 for text. Nevermind then :)

Went back to LC_ALL=C. Better to have ugly git logs than MILLIONS of Perl warnings about how the locale could not be set.

adding --encoding to the log call is a partly solution. It doesn't really matter WHAT you set the encoding to, actually. Very strange:
git log --oneline --stat --encoding=wtf
some_umlauts

Was this page helpful?
0 / 5 - 0 ratings