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

Commit messages are corrupted if there are "mixed" encodings in log #3707

Closed
ashumkin opened this issue May 17, 2017 · 0 comments · Fixed by #3708
Closed

Commit messages are corrupted if there are "mixed" encodings in log #3707

ashumkin opened this issue May 17, 2017 · 0 comments · Fixed by #3708
Milestone

Comments

@ashumkin
Copy link
Contributor

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When repository contains commit messages in UTF-8 and non-UTF-8 encodings, then commit messages that are differ from i18n.logOutputEncoding are displayed unreadable.
See screenshots
When git config i18n.logOutputEncoding = Windows-1251
ge-encoding-bug-logoutputencoding-non-utf-8
When git config i18n.logOutputEncoding = UTF-8
ge-encoding-bug-logoutputencoding-utf-8

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  1. Make a commit in a repository with a message in non-UTF-8 encoding. E.g.git -c i18n.commitEncoding= Windows-1251 commit ....
  2. Make a commit in a repository with a message in UTF-8 encoding.
  3. Open GitExtensions for the repository. See the bug.

What is the expected behavior?
Commit messages are displayed correctly in i18n.logOutputEncoding even they are made in different encodings (as git log does).
ge-encoding-bug-fixed

Which versions of GIT and which versions of Windows are affected by this issue? Did this work in previous versions of our tool?
Git < v1.8.4 is NOT affected (I guess) by this issue. Git >= v1.8.4 - IS affected.
The reason is that Git < v1.8.4. did not recode commit message when git log --format= was used. This was fixed in ecaee80 (pretty: --format output should honor logOutputEncoding, 2013-06-26) almost 4 years ago but GitExtensions still relies on a buggy version of Git.

P.S. This issue will be fixed in my pull request.

ashumkin added a commit to ashumkin/gitextensions that referenced this issue May 17, 2017
GitExtensions recodes commit messages that differ from
i18n.logOutputEncoding as Git before v1.8.4 did not do this because of a
a bug. Since v1.8.4 (see commit ecaee80 (pretty: --format output should
honor logOutputEncoding, 2013-06-26) in Git repository) Git does not
have this issue anymore, but GitExtensions still relies on its buggy
behaviour.

Today we know the version of Git with no bug. Let's rely on this
knowledge.

This fixes gitextensions#3707.
@jbialobr jbialobr added this to the 2.50 milestone May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants