没有BOM编码的UTF-8错误 [英] Bad UTF-8 without BOM encoding

查看:240
本文介绍了没有BOM编码的UTF-8错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用记事本++将所有文件转换为UTF-8,而没有BOM编码.我现在没有BOM的问题,但是没有BOM编码的UTF根本无法工作,就好像我的网站是用ANSI编码的一样.所有特殊字符都显示为:Â,Ú或á.

I converted all my files to UTF-8 without BOM encoding using Notepad++. I have no problem with BOMs anymore but the UTF without BOM encoding is simply not working, it's as if my site was encoded in ANSI. All special characters display either as: Â, Ú or á.

这可能是什么原因,我该如何解决?

What can be the reason for this and how can I fix it?

http://chusmix.com/?ciudad=Pilar

谢谢

推荐答案

您必须告诉浏览器将其接受为UTF-8,这样它才能正确解析多字节字符.将此meta标签与其余metas一起添加到<head>标签中:

You have to tell the browser to accept it as UTF-8 so it will properly parse multibyte characters. Add this meta tag in your <head> tag with the rest of your metas:

<meta http-equiv="content-type" content="text/html; charset=UTF-8" />

更新

对于HTML5,请改用以下标记:

For HTML5, use this tag instead:

<meta charset="utf-8">

这篇关于没有BOM编码的UTF-8错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆