纯文本文档的字符编码未声明 - mootool脚本 [英] The character encoding of the plain text document was not declared - mootool script

查看:1491
本文介绍了纯文本文档的字符编码未声明 - mootool脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是注意到,当我在FireFox浏览器上查看我的mootool.js脚本时,会弹出一个警告信息。



警告消息是未声明纯文本文档的字符编码,如果文档包含文档,文档将以某些浏览器配置中的乱码文本呈现来自US-ASCII范围以外的字符,文件的字符编码需要在传输协议中声明或需要使用字节顺序标记作为编码签名。



这是否意味着我必须添加一个Charset或什么?但它是一个脚本!!



有没有解决方案? >

解决方案

在您的HTML中,提供编码就像使用以下元素一样很好,例如:

 < meta http-equiv =content-typecontent =text / html; charset = utf-8/> 

但是您看到的警告可能会被其中一个触发多个文件,它可能不是你的HTML文档,它可能是一个javascript文件或css文件,如果你的页面是由多个php文件组成的,它可能只有这些文件中的一个。



我不认为这个错误与mootools有关,你在firefox控制台窗口中看到这个消息,而不是mootools脚本。



也许您只需要使用代码编辑器重新保存您的html页面,您可以指定正确的字符编码。


I just noticed that there is a warning message pops up when I view my mootool.js script on FireFox browser.

The warning message is "The character encoding of the plain text document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the file needs to be declared in the transfer protocol or file needs to use a byte order mark as an encoding signature.

does that mean I have to add a Charset or something? but it is a script!!

Is there a solution for this?

解决方案

In your HTML it is a good pratice to provide the encoding like using the following meta like this for example:

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

But your warning that you see may be trigged by one of multiple files. it might not be your HTML document. It might be something in a javascript file or css file. if you page is made of up multiples php files included together it may be only 1 of those files.

I dont think this error has anything to do with mootools. you see this message in your firefox console window. not mootools script.

maybe you simply need to re-save your html pages using a code editor that lets you specify the correct character encoding.

这篇关于纯文本文档的字符编码未声明 - mootool脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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