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!