View the git log in Git Bash in Windows. The log records are all in Chinese, and the gui setting is also utf-8 encoding.
The submitted log records are normal when viewed in gitlab.
As shown in the picture:
But if you use the xshell tool to connect to vagrant (this project directory is shared between windows and vagrant), enter the project directory and enter git log, the Chinese part will display garbled characters.
As shown in the picture:
But the project is on the server. Check the git log and the Chinese part in the log is displayed normally.
Is there any way to solve the Chinese garbled problem of git log in vagrant in xshell?
習慣沉默2017-05-02 09:41:59
Solved.
Solution:
export LESSCHARSET=utf-8
I found the answer on the Internet. At first I thought the author didn’t explain it clearly and didn’t say in which directory to execute this command. I didn’t expect that after I executed this command in any directory, the git log log and Chinese were displayed normally. .