W3 Validation. Character encoding mismatch?

Associate
Joined
29 Dec 2004
Posts
2,252
Hi guys,

Im just building a site using ModX (http://www.modxcms.com), so far am enjoying using it and am happy with how its going. Only problem i have is, when trying to validate using the W3.org validator i get the following:

Character Encoding mismatch!

The character encoding specified in the HTTP header (utf-8) is different from the value in the <meta> element (iso-8859-1). I will use the value from the HTTP header (utf-8) for this validation.

I have been Googling but cant find much help, all i can think of is that my documents are UTF-8 but i dont know how to change that?

Heres the header of my template:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />

And the demo site im running it on is here.

Can anyone help? :confused:
 
maybe try changing "charset=ISO-8859-1" to "charset=utf-8" and see if that works i have no idea wether it will or not but you never know :)
 
Fair point - thanks for your suggestion. I'll be honest i always had it set to 8859-1 in previous CMS's/Forum's/etc, don't really know what the difference is and what effect (if any) it will have.

Does anyone know what's going on, and if i do set it to UTF-8 what it means?!
 
It sounds like the web server is setting the character encoding in the http response - more specifically in the header part as suggested.

Your document is set for a western european character set. It is actually very similar to utf-8, a subset of it i believe.

You need to change the charset to utf-8. That will get rid of the error.
 
Thanks for your help. Is there any reason why SMF (PHP forums script), located here uses the exact same charset and header data and it doesnt give me the error? So its most likely not something the webserver is sending out, but something the ModX script is sending out? :confused:

Cheers :)
 
Any ideas about this one?

Warning Line 97 column 19: character "&" is the first character of a delimiter but occurred as data.

if (!o && d.getElementById) o=d.getElementById(id);

I get quite a lot of them warnings, but for some reason dont get them when the page isnt UTF-8...ah, good old total confusion - any help appreciated! :p
 
if it validates and its only a warning i suggest you leave it ive done myself a lot more harm than good trying to sort warnings out before lol
 
Back
Top Bottom