I added git bash in wt:

and when I input ls, then:

but when I open git bash (not using wt), it uses utf8:

how can I fix it?
Windows build number: windows10 1909 (10.0.18363.752)
Windows Terminal version (if applicable): 0.10.781.0
What is TERM, LANG, LC_ALL set to when running git bash in the Windows Terminal? What are their values when running in git bash directly?
What commandline are you providing for git bash in your profiles.json?
How to check them? "echo $LC_ALL" doesn't work.
the value of commandline : "commandline": "D:\Git\bin\bash.exe"
OK, I edit "bash.bashrc" in "%GITHOME%/Git/etc/".
add two lines in the tail:
export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"
and it works.
thanks for your help!
but I still wonder why it works when I use git bash directly......
Try changing your commandline to end with bash.exe -li
Try changing your commandline to end with
bash.exe -li
it works!
What does "-li" mean?
-li means --login and --interactive. They're two important arguments to make sure that Bash gets started up in the right configuration. The git-for-windows folks let us know that we were missing it in our config example :smile:
Most helpful comment
-limeans--loginand--interactive. They're two important arguments to make sure that Bash gets started up in the right configuration. The git-for-windows folks let us know that we were missing it in our config example :smile: