HTML5 UTF-8 中文乱码的解决方法_html5教程技巧

WBOY
Release: 2016-05-16 15:48:38
Original
2666 people have browsed it


复制代码
代码如下:





HTML5的标题


HTML5的内容!Hello





用记事本写,保存后在网页上运行出现了乱码,换成GB2312能正确显示中文

代码没有问题,问题就出记事本身上。 只是告诉浏览器要用utf-8来解释,而文档的编码,是在你保存时的选择决定的,如果保存ANSI 然后用utf-8解释,肯定是乱码,记事本的话,默认保存的文件格式是ANSI,所以在保存的时候要修改为uif-8。

Related labels:
source:php.cn
Statement of this Website
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
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!