Home >Operation and Maintenance >CentOS >What should I do if Chinese characters display garbled characters under centos?

What should I do if Chinese characters display garbled characters under centos?

王林
王林Original
2020-04-04 11:04:302669browse

What should I do if Chinese characters display garbled characters under centos?

View system language If you want to view the default language used by the current system, enter

echo $LANG

What should I do if Chinese characters display garbled characters under centos?

If you want to set it to Chinese, it must be supported Chinese font library. locale view, as shown in the figure:

What should I do if Chinese characters display garbled characters under centos?

Install Chinese support

yum groupinstall chinese-support -y

What should I do if Chinese characters display garbled characters under centos?

After installing Chinese support, set the local default language Just set it to Chinese.

centos system edit vi /etc/sysconfig/il8n, after configuration, restart the system reboot

What should I do if Chinese characters display garbled characters under centos?

##If it is a centos7 system, there is no /etc/ sysconfig/il8n Edit /etc/locale.conf

What should I do if Chinese characters display garbled characters under centos?

After setting, enter

source /etc/locale.conf

to reload the variables


What should I do if Chinese characters display garbled characters under centos?

Recommended related tutorials:

centos tutorial

The above is the detailed content of What should I do if Chinese characters display garbled characters under centos?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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