Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
Snaptags opened this issue Feb 8, 2017 · 11 comments
Closed

Comments

@Snaptags
Copy link

Snaptags commented Feb 8, 2017

  • [ 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

@PhilipOakley
Copy link

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.

@Snaptags
Copy link
Author

Snaptags commented Feb 9, 2017

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

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

@Snaptags
Copy link
Author

Snaptags commented Feb 9, 2017

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: 9e46438

@Snaptags
Copy link
Author

Snaptags commented Feb 9, 2017

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

@kgybels
Copy link

kgybels commented Feb 9, 2017

@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.

@Snaptags
Copy link
Author

Snaptags commented Feb 9, 2017

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

@Snaptags Snaptags closed this as completed Feb 9, 2017
@kgybels
Copy link

kgybels commented Feb 10, 2017

@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.

@Snaptags
Copy link
Author

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

@kgybels
Copy link

kgybels commented Feb 10, 2017

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

@Snaptags
Copy link
Author

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.

@Snaptags
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants