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

WJ
WJOriginal
2020-06-03 15:33:432334browse

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!

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