Centos Chinese garbled Solution

Source: Internet
Author: User
Tags i18n

How can we solve this problem if various Chinese characters are garbled in CentOS. This article describes common Garbled text and solutions.

1. The CentOS system accesses xxx.cn and Chinese garbled characters are found
So we used the previous method:
# Yum-y install fonts-chinese

After the CentOS system is installed, the Chinese font still cannot be displayed. I used gedit to edit the source code, and its Chinese comments were garbled. Later, we finally found the following solution and needed two packages supported by Chinese characters:
Fonts-chinese-3.02-12.el5.noarch.rpm
Fonts-ISO8859-2-75dpi-1.0-17.1.noarch.rpm

One is a Chinese font and the other is a font display package.
Install the SDK on the command line:
# Rpm-ivh XXXX

After the CentOS system is installed, restart it.

2. garbled display on terminals and gedit
# Vim/etc/sysconfig/i18n

Set:
LANG = "en_US.UTF-8"
SYSFONT = "latarcyrheb-sun16"

Modify the original content:

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"

Use yum to install Chinese Fonts

# Yum install fonts-chinese.noarch
System-> logout
When you log on to the CentOS system again, you will find that all interfaces have changed from English to Chinese.

Iii. Solutions to garbled Chinese characters on the telnet terminal over ssh
# Vim/etc/sysconfig/i18n

Add the original content:
LANG = "en_US.UTF-8"
SYSFONT = "latarcyrheb-sun16"

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"

Use yum to install Chinese Fonts
# Yum install fonts-chinese.noarch
Disconnect ssh and reconnect

4. Use Chinese Input Methods in CentOS 5.3
Command Line input:
# Yum install scim
# Yum install scim-pinyin

Restart X (Press Ctrl + Alt + Backpace) or log out (logout ). Now, you can enter Chinese characters. The problem of Chinese garbled characters in the CentOS system is solved in this way.

5. CentOS5.5 garbled and inaccessible
If the I settings of the Linux System in the vm are correct, you may not be able to access the Internet if the company network is bound to a mac or a different ip segment, you can try NAT on a virtual machine.
As for Chinese garbled characters, it may be the relationship between character packs. Try again

# Vim/etc/profile

export LC_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 and exit, reboot system ..

Garbled characters in X-window (graphic interface)
# Vim/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...

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.