Home > Operation and Maintenance > CentOS > Chinese characters display garbled characters under centos system

Chinese characters display garbled characters under centos system

王林
Release: 2020-03-19 15:37:59
Original
2041 people have browsed it

Chinese characters display garbled characters under centos system

First, install the Chinese language pack:

yum groupinstall chinese-support
Copy after login

Then modify the character encoding configuration. If there is no such file, create it:

vim /etc/sysconfig/i18n
Copy after login

(Recommended tutorial: centos usage tutorial)

The modified content is as follows:

LANG=”zh_CN.GB18030″
SUPPORTED=”zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en”
SYSFONT=”latarcyrheb-sun16″
Copy after login

i18n file is used to set the system language, such as: zh_CN.UTF-8, zh_CN.GB18030, zh_TW .Big5, en_US.UTF-8, etc.

There are three environment variables in i18n:
LANG variable, which sets the system language.
SUPPORTED variable determines the language supported by the system, that is, the language that the system can display.
SYSFONT variable represents the system font.

Finally restart the server:

reboot
Copy after login

Recommended related video tutorials: linux video tutorial

The above is the detailed content of Chinese characters display garbled characters under centos system. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template