You're not using an XHTML validator but the W3C Markup Validator, which
is a conglomeration of two rather difference pieces of software: an
SGML/XML validator (which some HTML-specific added featues) and an ad
hoc "HTML5 validator", a checker that checks against some unspecified
version of "HTML5" or "HTML Living Standard". From some recent notes, it
seems that it tries to check against the editor's draft for HTML 5.1, a
document that may and probably will change daily. See the thread starting at
http://lists.w3.org/Archives/Public/www-validator/2013Mar/0052.html
The problems you have faced are directly related to the issue of the
thread. The validator is using definitions that happened to be in the
editor's draft on a cloudy day, namely definitions that forbid both
"ascii" and "iso-8859-1" as encoding names (despite their being
officially registered by IANA and used for billions of documents).
Such foolish prohibitions are best ignored. The problem is that they
make it more difficult to notice any *real* problems the validator might
report.
There is, however, another problem with character encodings, and this is
something that the validator reports properly, though not with optimal
clarity. The document declares "iso-8859-1" in a <meta> tag, but the
server declares "ascii" in HTTP headers, as you can see e.g. by using
http://web-sniffer.net/ - the response headers include
Content-Type: text/html; charset=ascii
By current HTML specifications (HTML 4.01) and in browser practice, the
HTTP headers beat any <meta> tags. So there is no ambiguity: "ascii" is
used. On the other hand, browsers actually treat "ascii" was
"windows-1252", so there is no real problem even if your document were
in fact iso-8859-1 encoded or windows-1252 encoded.
If this was not confusing enough, the validator currently says:
"Internal encoding declaration iso-8859-1 disagrees with the actual
encoding of the document (us-ascii)."
It is *trying* to say what I wrote above, i.e. formal conflict between
<meta> tag and HTTP header, but it fails to say it. The *actual*
encoding of the document might be something completely different. This
isn't about the actual encoding, it's about a conflict between two ways
to *declare* the encoding.
For practical purposes, all the "error messages" in this case can be
ignored. The only thing that really matters here is that the server
declares "ascii", so unless you can change that, you cannot use e.g.
utf-8 encoding (which is generally the preferred encoding these days)
for your page. This in turn does not matter if your page contains only
Ascii characters, as seems to be the case.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/