NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 847 - Document (erroneously?) identified as "utf8" instead of "utf-8"
Document (erroneously?) identified as "utf8" instead of "utf-8"
Status: RESOLVED INTENTIONAL
Product: Validator.nu
Classification: Unclassified
Component: General
HEAD
All All
: P2 normal
Assigned To: Nobody
http://validator.nu/?doc=https%3A%2F%...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-28 20:01 CEST by Rintze Zelle
Modified: 2011-06-28 20:46 CEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rintze Zelle 2011-06-28 20:01:04 CEST
When I validate https://raw.github.com/gist/1036121/d48d3d8728d24d675fcb6e692f474337d6018fac/gistfile1.txt , I get the error and warnings:

---

Error: The encoding utf8 is not the preferred name of the character encoding in use. The preferred name is utf-8. (Charmod C024)
https://raw.github.com/gist/1036121/d48d3d8728d24d675fcb6e692f474337d6018fac/gistfile1.txt

Warning: XML processors are required to support the UTF-8 and UTF-16 character encodings. The encoding was utf8 instead, which is an incompatibility risk.
https://raw.github.com/gist/1036121/d48d3d8728d24d675fcb6e692f474337d6018fac/gistfile1.txt

Warning: External encoding information specified utf8, but XML declaration specified utf-8. Allowing external to override per RFC 3023. The well-formedness status of this document may change when decoupled from the external character encoding information.
At line 1, column 36
encoding="utf-8"?>↩<s

---

However, inspecting the DOM of the input file with Firebug shows that document.characterSet is set to "UTF-8", and I find no mention of "utf8". I've never seen this problem before, and documents from github.com that validated before now throw this error. Has anything changed on validator.nu's side in the last week or two? I contacted github.com, but they're not aware of any changes on their end.
Comment 1 Michael[tm] Smith 2011-06-28 20:46:51 CEST
checking the response headers from github, you'll see:

Content-Type: text/plain; charset=utf8

...so the error message is correct. to confrm wth the standards, they should instead be sending:

Content-Type: text/plain; charset=utf-8