[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23076: 24.5; vc-git: add a new variable for log output coding system

From: Nikolay Kudryavtsev
Subject: bug#23076: 24.5; vc-git: add a new variable for log output coding system
Date: Tue, 12 Apr 2016 01:12:21 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2

Eli, sorry for not describing this before in more details, but my data in those 3 points was wrong, as I said in the next letter after that one.

So here's how -F flag actually behaves with regards to encodings:
1. When you try to commit using the -F flag with Russian message.txt in windows-1251, it gives that warning:
Warning: commit message did not conform to UTF-8.
You may want to amend it after fixing the message, or set the config
variable i18n.commitencoding to the encoding your project uses.

 Then it recodes the log message as windows-1252(sic!). So the russian:
Would become:
2. Doing the same while having commitencoding = windows-1251 results in a legitimate commit.
3. Having message.txt in utf-8 and commitencoding = windows-1251 results in:
This is utf-8 recoded to windows-1251.

My conclusion from these experiments is different.  It seems like Git
simply records the log messages and outputs them without any
conversions or interpretation, disregarding i18n.commitEncoding.
That's not true. commitencoding has the immediate effect on the log encoding. You can see this by setting commitencoding = windows-1251 and doing git log for that test repo.

Log output is decoded by commitencoding, but logoutputencoding overrides it. You can test this by:
commitencoding = windows-1251
logoutputencoding = utf-8
This would make git log work again for that repo.

Best Regards,
Nikolay Kudryavtsev

reply via email to

[Prev in Thread] Current Thread [Next in Thread]