Cannot enter Chinese in the gitbash terminal that is added #4865

Closed
opened 2026-01-30 23:58:31 +00:00 by claunia · 4 comments
Owner

Originally created by @Sycqssice on GitHub (Nov 8, 2019).

I added gitbash to the windows terminal, but it can't display Chinese, the display like this:

Meteor@HONOR-V10 MINGW64 ~
$ cd /e
Meteor@HONOR-V10 MINGW64 /e
$ ls
'$RECYCLE.BIN' 'System Volume Information' music
IDEAcode VScodes qqmusic
JAVACODE blog sc
MAVENcode chromeDOWNLOAD xunleiDOWNLOAD
MavenRepository dupanDOWNLOAD ''$'\350\241\214\350\275\246\350\256\260\345\275\225' 'PPT'$'\346\250\241\346\235\277' fdmDOWNLOAD ''$'\351\205\267\347\240\201'
QTCODE idmDOWNLOAD
STScode js

But my folder “E:/” is actually like this:
'$RECYCLE.BIN' MavenRepository 'System Volume Information' dupanDOWNLOAD music 行车记录
IDEAcode PPT模板 VScodes fdmDOWNLOAD qqmusic 酷码
JAVACODE QTCODE blog idmDOWNLOAD sc
MAVENcode STScode chromeDOWNLOAD js xunleiDOWNLOAD

Originally created by @Sycqssice on GitHub (Nov 8, 2019). I added gitbash to the windows terminal, but it can't display Chinese, the display like this: ================================================== Meteor@HONOR-V10 MINGW64 ~ $ cd /e Meteor@HONOR-V10 MINGW64 /e $ ls '$RECYCLE.BIN' 'System Volume Information' music IDEAcode VScodes qqmusic JAVACODE blog sc MAVENcode chromeDOWNLOAD xunleiDOWNLOAD MavenRepository dupanDOWNLOAD ''$'\350\241\214\350\275\246\350\256\260\345\275\225' 'PPT'$'\346\250\241\346\235\277' fdmDOWNLOAD ''$'\351\205\267\347\240\201' QTCODE idmDOWNLOAD STScode js ================================================= But my folder “E:/” is actually like this: '$RECYCLE.BIN' MavenRepository 'System Volume Information' dupanDOWNLOAD music 行车记录 IDEAcode PPT模板 VScodes fdmDOWNLOAD qqmusic 酷码 JAVACODE QTCODE blog idmDOWNLOAD sc MAVENcode STScode chromeDOWNLOAD js xunleiDOWNLOAD
claunia added the Resolution-ExternalNeeds-Tag-FixNeeds-Attention labels 2026-01-30 23:58:32 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Nov 8, 2019):

Could you share a screenshot of what it looks like?

Does this occur with git bash running in the legacy windows console?

@zadjii-msft commented on GitHub (Nov 8, 2019): Could you share a screenshot of what it looks like? Does this occur with git bash running in the legacy windows console?
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 9, 2019):

This is just how ls (the GNU coreutils application) represents characters it doesn't think it can send to the terminal.

If you set the LANG environment variable appropriately, it will probably display those characters just fine.

@DHowett-MSFT commented on GitHub (Nov 9, 2019): This is just how `ls` (the GNU coreutils application) represents characters it doesn't think it can send to the terminal. If you set the `LANG` environment variable appropriately, it will probably display those characters just fine.
Author
Owner

@Sycqssice commented on GitHub (Nov 12, 2019):

I got it done,open D:\git\Git\etc\bash.bashrc
add
export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"
in the end

@Sycqssice commented on GitHub (Nov 12, 2019): I got it done,open D:\git\Git\etc\bash.bashrc add export LANG="zh_CN.UTF-8" export LC_ALL="zh_CN.UTF-8" in the end
Author
Owner

@coastman commented on GitHub (Jan 1, 2020):

@coolkiecat tks, it works for me!

@coastman commented on GitHub (Jan 1, 2020): @coolkiecat tks, it works for me!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#4865