Home >Operation and Maintenance >CentOS >Solution to Chinese garbled characters displayed on centos
centos displays garbled Chinese characters solution:
Recommendation: "centos usage tutorial"
1. Check your system If the Chinese language package is not installed, you can use the locale -a command to list all available locales:
See if there are the following four items:
If If yes, there is no need to install it. If not, you need to reinstall it. Use yum install kde-l10n-Chinese to install the Chinese language pack.
2. Modify the configuration files of i18n and locale.conf
First: Use the vim/etc/sysconfig/i18n command to open i18n and add the following two lines of code inside:
LANG="zh_CN.UTF-8" LC_ALL="zh_CN.UTF-8"
Then execute the source/etc/sysconfig/i18n command to make the modification effective.
Two: vim /etc/locale.conf
Add: LANG="zh_CN.UTF-8"
Then execute source /etc/locale.conf command to make the changes effective.
Recommended video tutorial for learning Linux: https://www.php.cn/course/list/33.html
The above is the detailed content of Solution to Chinese garbled characters displayed on centos. For more information, please follow other related articles on the PHP Chinese website!