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 9434 - precedence between charset and http-equiv
Summary: precedence between charset and http-equiv
Status: RESOLVED WORKSFORME
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/spec/Overview...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-06 18:22 UTC by Richard Ishida
Modified: 2010-10-04 14:30 UTC (History)
5 users (show)

See Also:


Attachments

Description Richard Ishida 2010-04-06 18:22:57 UTC
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.
Comment 1 Richard Ishida 2010-04-12 10:27:55 UTC
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 ?
Comment 2 Ian 'Hixie' Hickson 2010-04-13 06:07:57 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:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted
Change Description: no spec change
Rationale:

I believe that is accurate, yes.
Comment 3 Richard Ishida 2010-04-13 10:22:49 UTC
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