The character encoding of the plain text document was not declared - mootool script

encoding, firefox

Solution

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" />

Note: if any line between `<head>` and this meta line (Even if it's a commented note) problem will remain, so make sure you added meta line after `<head>` directly

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.

Problem

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?

Original source