Ubuntu 9.04 Server uses Putty client Chinese garbled characters

Source: Internet
Author: User
Tags change settings

Ubuntu uses Putty client remote connection to the server, may appear in the character interface Chinese garbled problem, the reason is: Ubuntu uses UTF-8 as the Chinese encoding by default. By default, Putty uses GB2312 to connect to the server. The inconsistency between the two causes Chinese garbled characters.

The solution is also very easy, that is, either to change the default Chinese encoding method of Ubuntu or to change the character set used when the Putty connection is used.

Change the default Chinese encoding mode in Ubuntu to GB2312.

### Method 1:

Open the putty main program, select window-> Appearance-> Font settings-> Change Settings, select the Fixedsys Font, and select CHINESE_GB2312 as the character set.

The code is as follows: Copy code

In window-> Appearance-> Translation, modify Ed data assumed to be in which character set, change Use font encoding to UTF-8

If it is frequently used, save these settings in the session.

Save method: After completing the preceding operations, select the following two items:
In window-> Appearance-> Translation, select TReat CJK ambiguous characters as wide and Caps Lock acts as Cyrillic switch.

### Method 2:

Edit/etc/sysconfig/i18n

Change "LANG =" zh_CN.UTF-8 & Prime; "to" LANG = "zh_CN.GB18030 & Prime;", save and log on again.

# Method 3:
Open putty, and enter

The code is as follows: Copy code

# Export LC_ALL = 'zh _ CN. utf8 & prime;

# Vi ~ /. Bash_profile

LANG = zh_CN.GB18030

LANGUAGE = zh_CN.GB18030: zh_CN.GB2312: zh_CN

Export LANG LANGUAGE

Method 4

The code is as follows: Copy code

Modify file:
/Var/lib/locales/supported. d/local
Content:
En_US.UTF-8 UTF-8
Zh_CN.UTF-8 UTF-8
Zh_CN.GBK GBK
Zh_CN GB2312
After saving, run the following command:
Sudo locale-gen

Enable the system to support Chinese characters.

Solution 5:

Change Putty to transfer using UTF-8 encoding when connecting to the server (test successful)

Window-> Appearance-> Font settings: Select or:

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.