Cygwin Chinese garbled characters? Cygwin garbled Solution

Source: Internet
Author: User

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 ~

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.