Centos6.5 Chinese garbled solution

Release: 2020-03-20 16:03:31
Original
2805 people have browsed it

Centos6.5 Chinese garbled solution

After installing CentOS, the Chinese text displays garbled characters. In Windows, the text uses GBK encoding by default, and in Linux, UTF-8 encoding is used by default. To solve this problem, you need to change the Linux encoding to GBK. Method As follows:

Recommended tutorial: centos usage tutorial

1. Check the supported character sets

#locale -a
Copy after login

2. Install the English version default The character set configuration is:

# cat /etc/sysconfig/i18n
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
Copy after login

3. Change to Chinese character set:

# vi /etc/sysconfig/i18n
LANG="zh_CN.GBK"
SUPPORTED="zh_CN.UTF-8:zh_CN:zh"
SYSFONT="latarcyrheb-sun16"
Copy after login

4. Execute the following command or restart to take effect.

# source /etc/sysconfig/i18n
Copy after login

Recommended related video tutorials: linux video tutorial

The above is the detailed content of Centos6.5 Chinese garbled solution. 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!