Centos addressed in html page views Chinese garbage problem

1. Install the appropriate 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 LANG=zh_CN.UTF-8

source /etc/profile

vim /etc/locale.conf

LANG=zh_US.UTF-8

2. Specify the meta html used in the character set

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Guess you like

Origin blog.51cto.com/mpflinux/2476581