如何解决Centos中html页面访问中文乱码问题

如何解决Centos中html页面访问中文乱码问题,第1张

如何解决Centos中html页面访问中文乱码问题

如何解决Centos中html页面访问中文乱码问题?

1.安装相应的语言包

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.在html的meta中指定使用的字符集

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

相关参考:centOS教程

以上就是如何解决Centos中html页面访问中文乱码问题的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/711597.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-24
下一篇 2022-04-24

发表评论

登录后才能评论

评论列表(0条)

保存