Closed Bug 320024 Opened 19 years ago Closed 9 years ago

conflict between MIME charset and meta charset should be better resolved

Categories

(Core :: Internationalization, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: eyalroz1, Assigned: smontagu)

Details

A possible solution to the issue raised in bug 255738 and bug 214952: Instead of always preferring meta over MIME or the other way around, apply the following short-circuit logic: 1. If the MIME charset isn't one of: {iso-8859-1, US-ASCII}, use the MIME charset. 2. Guess the charset using the auto-detection algorithm. 3. If the auto-detection agrees with the meta charset, use the meta charset. 4. Use the MIME charset. For a motivation of the two values in item 1, see bug 260728.
Severity: normal → enhancement
I'd expect this to be wontfix for the same reason as bug 214952...
sorry to pick nits: re: comment #0 You should have used '(charset specified in) HTTP header' (respect HTTP header) and '(charset specfied with) meta tag' rathaer than 'MIME' and 'meta'. Whether it's specifed in HTTP header or meta tag, it's always MIME charset. BTW, you can just use 'bug xyz comment i' in place of a full url.
It violates the spec in fewer situations than your previous suggestions, but that doesn't make it "middle-ground". I believe it still goes directly against what the specs say.
I already explained why it does not violate the spec.
Plus, debate it on the merits, then we'll talk about spec compliance.
QA Contact: amyy → i18n
We implement the spec now.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
(In reply to Henri Sivonen (:hsivonen) from comment #7) Do you implement it as I argue you should, here: https://bugzilla.mozilla.org/show_bug.cgi?id=214952#c8 ? If so, then WORKSFORME is valid, if not, why not?
Multiple browsers implement the spec, and it is believed that deviating from the spec would break stuff. The situation isn't ideal in the light of Ruby's Postulate (http://www.intertwingly.net/slides/2004/devcon/69.html), but rocking the boat at this point isn't worthwhile.
Resolution: WORKSFORME → WONTFIX
(In reply to Henri Sivonen (:hsivonen) from comment #9) This does not actually address my question. I believe my suggestion is compatible with the spec (although frankly I did not look for changes from HTML 4 to HTML 5 yet) - as per the discussion in the comments for bug 214952. Can you explain how/why meeting the spec conflicts with the suggestion here? I realize I'm being somewhat pedantic, but this is somewhat of a fine point, and you have closed my bug, so - please indulge me.
"The spec" means https://html.spec.whatwg.org/ . HTML4 is not relevant. https://html.spec.whatwg.org/#determining-the-character-encoding and https://encoding.spec.whatwg.org/#decode taken together specify the order. (The BOM takes the highest precedence, then HTTP, then <meta>.)
You need to log in before you can comment on or make changes to this bug.