CentOS Chinese garbled Solution 2

Source: Internet
Author: User
Tags comments i18n ssh

Special Note: VM10 with virtual machine sharing tools to automatically identify the contents of Chinese files in utf-8 format


The following steps are excerpted from the network:

Two schemes are in fact similar, here provide two files download address, lest go online search these two files;

fonts-chinese-3.02-12.el5.noarch.rpm:http://download.csdn.net/detail/tianyazaiheruan/6908943

fonts-iso8859-2-75dpi-1.0-17.1.noarch.rpm:http://download.csdn.net/detail/tianyazaiheruan/6908965

programme I:

In the use of CentOS system, the emergence of a variety of Chinese garbled, how do we solve this problem.

First, CentOS system access to xxx.cn, found Chinese garbled

So in the previous way: Yum-y install Fonts-chinese

After the CentOS system is installed, the Chinese font cannot be displayed. I use Gedit edit source code, which is also garbled comments.

Later, finally found the following methods can be resolved, requires two Chinese-supported packages:

fonts-chinese-3.02-12.el5.noarch.rpm

fonts-iso8859-2-75dpi-1.0-17.1.noarch.rpm

One is the Chinese font, one is the font display package.

Install on the command line:

#rpm-IVH XXXX

Note: in accordance with the general will go to check the font settings of direct correlation and analysis of the dependencies between packages, and so on a series of things caused by the unsuccessful, here is recommended to install the following command: RPM-IVH XXXX--nodeps--force

After the CentOS system installation is complete, reboot can be done.

Second, terminal, gedit display garbled

#vi/etc/sysconfig/i18n

Will lang= "en_US." UTF-8 "

Sysfont= "Latarcyrheb-sun16"

Modify the original content to

Lang= "ZH_CN. GB18030 "

Language= "Zh_CN.GB18030:zh_CN.GB2312:zh_CN"

Supported= "ZH_CN. Utf-8:zh_cn:zh:en_us. Utf-8:en_us:en "

Sysfont= "Lat0-sun16"

Install Chinese fonts with Yum

#yum Install Fonts-chinese.noarch

System-> Logout Logoff

When you log back into the CentOS system, you will find that all interfaces have changed from English to Chinese.

Third, in SSH, Telnet terminal Chinese display garbled solution

#vi/etc/sysconfig/i18n

Lang= the original content to "en_US." UTF-8 "

Sysfont= "Latarcyrheb-sun16"

Amended to

Lang= "ZH_CN. GB18030 "

Language= "Zh_CN.GB18030:zh_CN.GB2312:zh_CN"

Supported= "ZH_CN. Utf-8:zh_cn:zh:en_us. Utf-8:en_us:en "

Sysfont= "Lat0-sun16"

Install Chinese fonts with Yum

#yum Install Fonts-chinese.noarch

Disconnect ssh, reconnect

Iv. using Chinese Input method in CentOS system 5.3

Command Line Input:

#yum Install SCIM

#yum Install Scim-pinyin

Restart X (press Ctrl+alt+backpace) or logout (logout).

OK, you can enter Chinese. CentOS system appears the problem of Chinese garbled so solved.

Five, CentOS5.5 garbled and can not access the Internet

Determine the VM within the Linux system I settings are not a problem, if the company network has a binding Mac or set the IP segment is different, you may not be able to access the Internet, you can use the virtual machine NAT test.
As for Chinese garbled, may be the relationship between the font package, you try
Vi/etc/profile
Exportlc_all= "ZH_CN. Gb18030:zh_cn. Gb2312:zh_cn. GBK:zh_CN:en_US. Utf-8:en_us:en:zh:zh_tw:zh_cn. BIG5 "
Save exit, reboot system can ...

2.x-window (graphical interface) of garbled
vi/etc/sysconfig/i18n
Lang= "ZH_CN. Gb18030:zh_cn. Gb2312:zh_cn. GBK:zh_CN:en_US. Utf-8:en_us:en:zh:zh_tw:zh_cn. BIG5 "
Language= "ZH_CN. Gb18030:zh_cn. Gb2312:zh_cn. GBK:zh_CN:en_US. Utf-8:en_us:en:zh:zh_tw:zh_cn. BIG5 "
Save reboot ...

When using the CentOS system, you may encounter an English CentOS system when you install it, in which case installing the CentOS system is the default installation (ie English). After installation, the emergence of a variety of Chinese garbled. So, how do we solve this problem?



Programme II:
First, CentOS system access to g.cn, found in Chinese garbled.

So in the previous way: Yum-y install Fonts-chinese
After the CentOS system is installed, the Chinese font cannot be displayed. I use Gedit edit source code, which is also garbled comments.

Later, finally found the following methods can be resolved, requires two Chinese-supported packages:
fonts-chinese-3.02-12.el5.noarch.rpm
ftp://ftp.muug.mb.ca/mirror/centos/5.4/os/x86_64/CentOS/fonts-chinese-3.02-12.el5.noarch.rpm


fonts-iso8859-2-75dpi-1.0-17.1.noarch.rpm
ftp://ftp.muug.mb.ca/mirror/centos/5.4/os/x86_64/CentOS/fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm
One is the Chinese font, one is the font display package.

After downloading, install at the command line:
#rpm-IVH xxxx (xxxx represents the full name of the above two packages, RPM does not know how to use it. )
After the CentOS system installation is complete, reboot can be done.

Second, terminal, gedit display garbled

#vi/etc/sysconfig/i18n
Will lang= "en_US." UTF-8 "
Sysfont= "Latarcyrheb-sun16"
Modify the original content to
Lang= "ZH_CN. GB18030 "
Language= "Zh_CN.GB18030:zh_CN.GB2312:zh_CN"
Supported= "ZH_CN. Utf-8:zh_cn:zh:en_us. Utf-8:en_us:en "
Sysfont= "Lat0-sun16"

Install Chinese fonts with Yum
#yum Install Fonts-chinese.noarch
System-> Logout Logoff
When you log back into the CentOS system, you will find that all interfaces have changed from English to Chinese. Enter the date command test at the terminal
#date
Monday, November 24, 2009 12:07:00 CST

Third, in SSH, Telnet terminal Chinese display garbled solution (CentOS 5.3)

#vi/etc/sysconfig/i18n
Lang= the original content to "en_US." UTF-8 "
Sysfont= "Latarcyrheb-sun16"
Amended to
Lang= "ZH_CN. GB18030 "
Language= "Zh_CN.GB18030:zh_CN.GB2312:zh_CN"
Supported= "ZH_CN. Utf-8:zh_cn:zh:en_us. Utf-8:en_us:en "
Sysfont= "Lat0-sun16"

Install Chinese fonts with Yum
#yum Install Fonts-chinese.noarch
Disconnect ssh, reconnect
Enter the date command test at the terminal
#date
Monday, November 24, 2009 12:09:00 CST

Iv. using Chinese Input method in CentOS system 5.3

My previous method was to install the Penguin version, see the next page. Here, there's a simpler one, just use Yum to install SCIM.
Command Line Input:
#yum Install SCIM
#yum Install Scim-pinyin
Restart X (press Ctrl+alt+backpace) or logout (logout).

OK, you can enter Chinese. CentOS system appears the problem of Chinese garbled so solved.

Related Article

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.