search

Home  >  Q&A  >  body text

xshell checks the git log in vagrant and the Chinese is garbled

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?

天蓬老师天蓬老师2822 days ago1315

reply all(2)I'll reply

  • 仅有的幸福

    仅有的幸福2017-05-02 09:41:59

    Try setting the xshell encoding to utf-8

    reply
    0
  • 習慣沉默

    習慣沉默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. .

    reply
    0
  • Cancelreply