Home>Article>Operation and Maintenance> Solution to Chinese garbled characters displayed on centos

Solution to Chinese garbled characters displayed on centos

尚
Original
2020-03-13 14:22:26 8118browse

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:

Solution to Chinese garbled characters displayed on centos

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://m.sbmmt.com/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!

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