Closed Bug 839948 Opened 12 years ago Closed 12 years ago

Downgrade "The character encoding of the HTML document was not declared" from error to warning

Categories

(Core :: DOM: HTML Parser, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: jruderman, Unassigned)

Details

My error console tends to fill up with this irrelevant "error". I think it should be downgraded to warning, so it's not in the way of diagnosing actual brokenness. "Error: The character encoding of the HTML 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 page must be declared in the document or in the transfer protocol." (By the way, validator.nu treats it as an error only if the document contains non-ASCII. I'm not sure if Firefox could do that without a perf hit.)
(In reply to Jesse Ruderman from comment #0) > My error console tends to fill up with this irrelevant "error". When browsing the Web or when writing test cases? > I think it > should be downgraded to warning, so it's not in the way of diagnosing actual > brokenness. Failure to declare the character encoding *is* actual brokenness for the reason the message states: > "Error: The character encoding of the HTML 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 page must be declared in the document or in the transfer > protocol." Since different Firefox locales ship with different encoding defaults, relying on the default is real brokenness. > (By the way, validator.nu treats it as an error only if the document > contains non-ASCII. I'm not sure if Firefox could do that without a perf > hit.) Validator.nu is out of date and will be fixed in due course. The spec now makes this a conformance error even in the all-ASCII case in order to flag in the development phase broken content management systems that might get non-ASCII text filled into their templates later.
Resolving WONTFIX, because this reports an actual problem, a problem that's an error per spec and a problem that's way less common than our CSS parser whines when browsing the Web (as opposed to writing test cases). Personally, I have solved the test case writing problem by having a template in Nautilus that lets me create a new HTML doc with the right boilerplate.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.