Home >Operation and Maintenance >CentOS >How to solve the problem of Chinese garbled characters when accessing HTML pages in Centos
#How to solve the problem of Chinese garbled characters when accessing html pages in Centos?
1. Install the corresponding language pack
yum -y install kde-l10n-Chinese && yum -y reinstall glibc-common localedef -c -f UTF-8 -i zh_CN zh_CN.utf8 export LC_ALL=zh_CN.utf8 vim /etc/profile export LC_ALL=zh_CN.utf8 export.UTF-8 source /etc/profile vim /etc/locale.conf
2. Specify the character set used in the meta of html
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
Related references:centOS Tutorial
##
The above is the detailed content of How to solve the problem of Chinese garbled characters when accessing HTML pages in Centos. For more information, please follow other related articles on the PHP Chinese website!