如何删除 我网站中的额外字符? [英] How to remove  extra character in my Website?

查看:13
本文介绍了如何删除 我网站中的额外字符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Firebug  中看到了这个字符.

I see this character in Firebug .

我不知道为什么会这样,我的代码中没有这样的字符.对于 Firefox 来说没问题,但在 IE 中一切都中断了.我什至无法在 Google 中搜索此字符.

I don't know why this is happening, there's no such character in my code. For Firefox it's OK, but in IE everything breaks. I can't even search for this character in Google.

我使用没有 bom 的 utf-8 编码保存了我的文件.

I saved my file with utf-8 encoding without bom.

推荐答案

当您包含包含字符(零宽度无间断空间)的文件时,会发生这种情况.

This occurs when you include files that contains the char  (ZERO WIDTH NO-BREAK SPACE).

这个字符是一个 BOM,你只能用低级文本编辑器(比如 DOS 编辑)看到 BOM.

this character is a BOM and you can only see BOMs with low level text editors (such as DOS edit).

您可以通过查看元素检查器来调试它,并评论需要或包含以查看包含 BOM 的文件.

you can debug it seeing the Element inspector, and commenting the requires or includes to see what file contains the BOM.

然后,您可以复制文件的内容,将编码更改为以utf8 编码",保存并再次包含它.(notepad++) 可以保存

then , you can copy the content of the file, change the Encoding to "encode in utf8", save and you can include it again. (notepad++) can save it

成功.

这篇关于如何删除 我网站中的额外字符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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