UTF-8 和 UTF-8 ISO-8859-2 问题
我遇到了 html 编码问题。我在 PSPad 上工作。我将 utf-8 设置为文件中的字符集,并将 utf-8 设置为文件格式,它在本地主机上看起来很好,但在服务器上却不然。 当我将文件格式更改为 iso 时,它可以在服务器上运行,但不能在本地主机上运行,并且当我关闭 PSPad 并重新打开文件时,它完全破坏了一些字符。 你有什么解决办法吗?真是太烦人了! :) 谢谢 K.
I've got a problem with html encoding. I work on PSPad. I set utf-8 as charset in my files and utf-8 as a file format and it look fine on localhost but doesn't on a server.
When i change file format to iso it works on a server but doesn't on localhost and when i close PSPad and reopen the file it totaly breaks some of the characters.
Do u have any solution? It so annoying! :)
thanks
K.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
确保外部服务器也发送字符集声明。您使用什么服务器软件?在 Apache 中,您可以通过添加包含以下内容的 .htaccess 文件来实现:
还要确保添加
声明 (HTML5) 或
到 HTML 文件头。
编辑:更正错别字
Make sure that the foreign server sends a charset declaration as well. What server software do you use? In Apache you could achieve it by adding a .htaccess file with the following content:
Also make sure that you add a
declaration (HTML5) or a
To the HTML file header.
Edit: corrected typos