Home > Operation and Maintenance > CentOS > Solution to Chinese garbled characters in centos system

Solution to Chinese garbled characters in centos system

Release: 2020-03-23 16:20:27
Original
4269 people have browsed it

Solution to Chinese garbled characters in centos system

centos system Chinese garbled solution:

Recommended tutorial: centos usage tutorial

1. Check if your system has To install the Chinese language pack, you can use the locale -a command to list all available language environments and see if there are the following four items:

Solution to Chinese garbled characters in centos system

If so, there is no need to install it. If No, you need to reinstall it. Use the yum install kde-l10n-Chinese command to directly install the Chinese language pack.

2. Modify the configuration files of i18n and locale.conf

Use the vim/etc/sysconfig/i18n command to open the i18n file

Add the following two lines of code inside:

LANG="zh_CN.UTF-8"
LC_ALL="zh_CN.UTF-8"
Copy after login

Then execute the source/etc/sysconfig/i18n command to make the configuration take effect.

Use the vim /etc/locale.conf command to open the locale.conf file, add the envy code:

LANG="zh_CN.UTF-8"
Copy after login

Then execute the source /etc/locale.conf command to make the configuration take effect.

Recommended related video tutorials: linux video tutorial

The above is the detailed content of Solution to Chinese garbled characters in 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