git log cannot print correct chinese charecter #9624

Closed
opened 2026-01-31 01:59:29 +00:00 by claunia · 1 comment
Owner

Originally created by @shinegrin on GitHub (Jul 15, 2020).

I'm running powershell with windows terminal, with ENV LESSCHARSET=utf-8 and gitconfig as following:

[difftool "sourcetree"]
	cmd = '' \"$LOCAL\" \"$REMOTE\"
[mergetool "sourcetree"]
	cmd = "'' "
	trustExitCode = true
[i18n]
	commitencoding = utf-8
	logoutputencoding = utf-8
[core]
	quotepath = false
[gui]
	encoding = utf-8

It works well when i using powershell without windows terminal.
Anyone knows how to fix it?

Originally created by @shinegrin on GitHub (Jul 15, 2020). I'm running powershell with windows terminal, with ENV `LESSCHARSET=utf-8` and gitconfig as following: ```gitconfig [difftool "sourcetree"] cmd = '' \"$LOCAL\" \"$REMOTE\" [mergetool "sourcetree"] cmd = "'' " trustExitCode = true [i18n] commitencoding = utf-8 logoutputencoding = utf-8 [core] quotepath = false [gui] encoding = utf-8 ``` It works well when i using powershell without windows terminal. Anyone knows how to fix it?
claunia added the Needs-TriageNeeds-Tag-Fix labels 2026-01-31 01:59:29 +00:00
Author
Owner

@zero2hj commented on GitHub (Aug 25, 2020):

for followers who met this problem please see

添加系统变量
LANG=zh_CN.UTF-8
LC_ALL=zh_CN.UTF-8
其实添加其中一个就行

@zero2hj commented on GitHub (Aug 25, 2020): for followers who met this problem please [see ](https://answers.microsoft.com/zh-hans/windows/forum/all/win-10/07ca1410-cc2b-47e1-a424-c01b57dabdbe) > 添加系统变量 LANG=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8 其实添加其中一个就行
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#9624