When Cygwin enters the Windows directory, all Chinese files are changed to "???", What should we do? How to solve Cygwin Chinese garbled characters? The following are the solutions collected by the Helper family. I hope they will help you.
Cygwin Chinese garbled solution:
Configuration steps:
1. In the user directory (cd ~) Add the following code at the end of the. bash_profile file in
Export LC_ALL = en_US.UTF-16
Export LC_CTYPE = en_US.UTF-16
Export LANG = en_US.UTF-16
Export XMODIFIERS = @ im = Chinput3
Stty cs8-istrip
Stty pass8
Export LESSCHARSET = latin1
2. Likewise ~ Directory, remove the comments of the Code in the. inputrc file (the # above)
Set meta-flag on
Set convert-meta off
Set input-meta on
Set output-meta on
3. Or ~ Directory, add code to the. bashrc File
Alias ls = 'ls -- color -- show-control-chars'
4. Restart Cygwin.
The configuration is complete. Chinese characters are supported and all garbled characters are eliminated.
5. If you are a domain user, you need to import the user group and user of the domain (the user has renewed the domain when I perform the operation ).
Mkgroup-d>/etc/group
Mkpasswd-d-u domain name to be imported>/etc/passwd
OK! Cygwin Chinese garbled problem solved! If you encounter garbled characters when using Cygwin, you can use the following methods to solve the problem ~