This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
I see text in the spec saying that you should use only one or other of the meta charset or meta http-equiv approaches for specifying the encoding of a document, but afaict there is no text to indicate what should be done if an author does use both and they differ, ie. which takes precedence. I can imagine situations where both declarations may end up in a document, and ways in which they can become out of synch during subsequent work on the file, so i think we should specify the precedence clearly.
Ah, I think i understand. The character encoding detection algorithm chooses whichever comes first and ignores any other encoding declaration, which solves the problem raised by this bug. Right ?
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: http://dev.w3.org/html5/decision-policy/decision-policy.html Status: Accepted Change Description: no spec change Rationale: I believe that is accurate, yes.
Btw, this appears to be the behaviour of major browsers also. See the last two rows of the Precedence table at http://www.w3.org/International/tests/tests-html-css/tests-character-encoding/results-html-encoding-basic