utf-8特殊字符不显示 [英] utf-8 special characters not displaying
问题描述
例如,我的索引页面很好,但是我的个人资料页面是T。 faq.html工作正常,但是当我将其重命名为faq.php时,它不会。最奇怪的是,我有一个带有两个JQuery选项卡的页面,其中一个正确显示,另一个不显示。
有人可以帮我吗? >
这是一个非常令人讨厌的问题,但您可以尝试这些。
首先,确保该文件实际上以UTF-8格式保存。
然后检查您是否具有< meta http-equiv =您的HTML标题中的Content-Typecontent =text / html; charset = UTF-8>
尝试在PHP脚本开头调用头('Content-Type:text / html; charset = utf-8');
或添加 AddDefaultCharset UTF-8
到您的.htaccess文件。
I moved my website from my local test server to NameCheap shared hosting and now I'm running into a problem - some of the pages aren't displaying utf-8 special characters properly (showing question marks instead). All pages are utf-8 encoded, as are all database tables. The strange thing is, some pages display correctly and some don't, in a seemingly random pattern.
For instance, my index page is fine, but my profile page isn't. faq.html works fine, but when I rename it to faq.php it doesn't. And weirdest of all, I have a page with two JQuery tabs where one displays correctly and the other doesn't!
Can someone help me out with this?
This is really annoying problem to fix but you can try these.
First of all, make sure the file is actually saved in UTF-8 format.
Then check that you have <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
in your HTML header.
You can also try calling header('Content-Type: text/html; charset=utf-8');
at the beginning of your PHP script or adding AddDefaultCharset UTF-8
to your .htaccess file.
这篇关于utf-8特殊字符不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!