在linux服务器上无法显示汉字 [英] can't show chinese character for html on linux server
问题描述
$ b
<!DOCTYPE 这个网页不能显示中文字符,我可以找到显示这些字符的方法吗? HTML PUBLIC - // W3C // DTD XHTML 1.0 Transitional // ENhttp://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html xmlns =http: //www.w3.org/1999/xhtml\"><head>
< html>
< head>
< meta http-equiv =Content-Typecontent =text / html; charset = UTF-8/>
< META HTTP-EQUIV =Content-languageCONTENT =zh>
< link rel =stylesheethref =css / reset.csstype =text / cssmedia =screencharset =GBK/>
< script type =text / javascriptsrc =js / jquery-1.7.1.js>< / script>
< script type =text / javascriptsrc =js / jquery.cookie.js>< / script>
< script type =text / javascriptsrc =js / counter.js>< / script>
< / head>
< body>
< h1>您在这张图片中是星座吗?星座< / h1>
< img src =a.png>
< div id =page1_yes>
< input type =buttonname =yesbvalue =Yes>
< / div>
< div id =page1_no>
< input type =buttonname =nobvalue =No>
< / div>
< / body>
< / html>
-----------结果在这里:
是您的您的网络服务器最有可能输出一张图片中的黄道带符号吗? Content-Type
设置为 ISO-8859-1
或别的东西的HTTP头,否决了< meta>
Content-Type标签。配置你的网络服务器输出一个正确的编码的HTTP标头和/或确保你的HTML实际上保存在UTF-8中。
This webpage can't show chinese character, Can I find a way to display these characters ?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<META HTTP-EQUIV="Content-language" CONTENT="zh">
<link rel="stylesheet" href="css/reset.css" type="text/css" media="screen" charset="GBK" />
<script type="text/javascript" src="js/jquery-1.7.1.js"></script>
<script type="text/javascript" src="js/jquery.cookie.js"></script>
<script type="text/javascript" src="js/counter.js"></script>
</head>
<body>
<h1>Is your sign of zodiac in this picture ?星座</h1>
<img src="a.png">
<div id="page1_yes" >
<input type="button" name="yesb" value="Yes">
</div>
<div id="page1_no">
<input type="button" name="nob" value="No">
</div>
</body>
</html>
-----------result is here: Is your sign of zodiac in this picture ?ÐÇ×ù
Your web server is most likely outputting a Content-Type
HTTP header which is set to ISO-8859-1
or something else, overruling your <meta>
Content-Type tag. Configure your web-server to output an HTTP header with the correct encoding and/or make sure your HTML is actually saved in UTF-8.
这篇关于在linux服务器上无法显示汉字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!