Home >Operation and Maintenance >CentOS >What should I do if vim displays Chinese garbled characters under centos?

What should I do if vim displays Chinese garbled characters under centos?

王林
王林Original
2020-05-18 10:22:122747browse

What should I do if vim displays Chinese garbled characters under centos?

1. Install the Chinese language pack

# yum -y groupinstall chinese-support

2. Set the corresponding character set

#vi  /etc/sysconfig/i18n
LANG="zh_CN.UTF-8"

or edit the /etc/profile configuration file and add the following One line

export LANG="zh_CN.UTF-8"

3. Make the configuration take effect

# . /etc/profile        
source /etc/profile

4. View the current character set

# echo $LANG

Recommended tutorial: centos tutorial

The above is the detailed content of What should I do if vim displays Chinese garbled characters under 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