Get the App
SLTechnology News&Howtos  ›  Servers  › 

What should I do if Chinese garbled occurs after the English CentOS system is installed by default?

Shulou Source: shulou.com Published: 2022-06-01 07:15:55 10月03日 Update

This article will explain in detail what to do about the Chinese garbled code after the default installation of the English CentOS system, the content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.

First, the CentOS system visits g.cn and finds Chinese garbled codes.

So use the previous way: yum-y install fonts-chinese

After the CentOS system is installed, Chinese fonts still cannot be displayed. I use gedit to edit the source code, and its Chinese comments are also garbled.

Later, we finally found the following solution, which 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, the other is the font display package.

Can be downloaded from the following address: http://ftp.dc.volia.com/pub/CentOS/CentOS/

After downloading, install it on the command line:

# rpm-ivh XXXX (XXXX represents the full name of the above two packages. Rpm doesn't know how to use it, does it? )

After the CentOS system installation is complete, restart it.

Terminal and gedit display garbled code

# vi / etc/sysconfig/i18n

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 logout

When you log in to the CentOS system again, you will find that all interfaces have changed from English to Chinese. Enter the date command at the terminal to test

# date

Monday, November 24, 2009, 12:07:00 CST

Solution to garbled Chinese display in ssh and telnet terminals (CentOS 5.3)

# vi / etc/sysconfig/i18n

LANG= "en_US.UTF-8" the original content

SYSFONT= "latarcyrheb-sun16"

Modify 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 and reconnect

Enter the date command at the terminal to test

# date

Monday, November 24, 2009, 12:09:00 CST

4. Using Chinese input method in CentOS system 5. 3

My previous method was to install the penguin version, http://blog.csdn.net/zccst/archive/2009/08/27/4489555.aspx. Here, there is a simpler one, just install SCIM using yum.

Enter on the command line:

# yum install scim

# yum install scim-pinyin

Restart X (press Ctrl+Alt+Backpace) or log out (logout).

On the English CentOS system default installation of Chinese garbled code how to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Chinese system garbled font Chinese font content command terminal input English how to do two article method week more knowledge article test good Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL MariaDB Linux Docker Apple