Quantcast
Channel: Active questions tagged charset - Stack Overflow
Viewing all articles
Browse latest Browse all 53

Why does the character encoding of HTML source code need to match the one declared in the meta charset tag?

$
0
0

The title very much describes the question. The HTML standard says explicitly that the only value acceptable for the <meta charset> tag is UTF-8, and even the Nu Html Checker throws an error if any other value is used. But, it also throws another error at the same time:

Internal encoding declaration iso-8859-1 disagrees with the actual encoding of the document (utf-8)

I used the value 'iso-8859-1' in the <meta> charset this time.

If the only value we can use is UTF-8, I just can't understand the need to state this as a rule to follow.

The HTML standard itself doesn't say much about this, and the encoding standard of Whatwg is too technical for me to read and find out myself, so I need help understanding this.


Viewing all articles
Browse latest Browse all 53

Trending Articles