This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11411 - The encoding sniffing algorithm doesn't match the 'in head' insertion mode in some case when <meta> has both charset and content attributes
Summary: The encoding sniffing algorithm doesn't match the 'in head' insertion mode in...
Alias: None
Product: HTML WG
Classification: Unclassified
Component: LC1 HTML5 spec (show other bugs)
Version: unspecified
Hardware: All All
: P2 critical
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
Depends on:
Reported: 2010-11-26 12:56 UTC by Henri Sivonen
Modified: 2011-08-04 05:17 UTC (History)
4 users (show)

See Also:


Description Henri Sivonen 2010-11-26 12:56:54 UTC
In 'in head', if the value of the charset attribute is a supported ASCII-compatible character encoding or a UTF-16 encoding, the charset attribute takes precedence over the content attribute.

However, in the encoding sniffing algorithm the last one of charset and content takes precedence and, furthermore, if charset comes before content, both get ignored if http-equiv="Content-Type" isn't present also.

Please make the encoding sniffing algorithm match the processing in the 'in head' insertion mode.
Comment 1 Ian 'Hixie' Hickson 2010-12-08 01:27:08 UTC
It'll never match exactly, since the scanner doesn't do all kinds of stuff (e.g. skip <script>). But I'll see what I can do.
Comment 2 Ian 'Hixie' Hickson 2011-01-11 06:02:58 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:

Status: Accepted
Change Description: see diff given below
Rationale: Concurred with reporter's comments.
Comment 3 contributor 2011-01-11 06:03:43 UTC
Checked in as WHATWG revision r5764.
Check-in comment: Make the charset sniffer more accurately match the parser.
Comment 4 Michael[tm] Smith 2011-08-04 05:17:28 UTC
mass-move component to LC1