What should I do if the centos terminal displays garbled Chinese characters?

王林
Release: 2020-05-17 10:24:17
Original
3032 people have browsed it

What should I do if the centos terminal displays garbled Chinese characters?

First execute the following command to check whether the current system has a Chinese language pack

locale -a | grep zh_CN*
Copy after login

What should I do if the centos terminal displays garbled Chinese characters?

If the above content is displayed, it means that Chinese has been installed package, if not, execute the following command to install it:

yum install kde-l10n-Chinese
Copy after login

Then execute the following command

vi /etc/locale.conf
Copy after login

The display is as follows

LANG="C"
Copy after login

Change "C" to "zh_CN. UTF-8"

Then execute the command

source /etc/locale.conf
Copy after login

Finally execute the locale command to view the result

What should I do if the centos terminal displays garbled Chinese characters?

As shown in the above figure, it means the modification is successful.

Recommended tutorial:centos tutorial

The above is the detailed content of What should I do if the centos terminal displays garbled Chinese characters?. 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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!