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)
Core
Internationalization
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.
| Reporter | ||
Updated•19 years ago
|
Severity: normal → enhancement
Comment 1•19 years ago
|
||
I'd expect this to be wontfix for the same reason as bug 214952...
| Reporter | ||
Comment 2•19 years ago
|
||
(In reply to comment #1)
Not at all. This is a middle-ground suggestion; see
https://bugzilla.mozilla.org/show_bug.cgi?id=214952#c15
https://bugzilla.mozilla.org/show_bug.cgi?id=214952#c18
Comment 3•19 years ago
|
||
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.
Comment 4•19 years ago
|
||
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.
| Reporter | ||
Comment 5•19 years ago
|
||
I already explained why it does not violate the spec.
| Reporter | ||
Comment 6•19 years ago
|
||
Plus, debate it on the merits, then we'll talk about spec compliance.
Updated•16 years ago
|
QA Contact: amyy → i18n
Comment 7•9 years ago
|
||
We implement the spec now.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → WORKSFORME
| Reporter | ||
Comment 8•9 years ago
|
||
(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?
Comment 9•9 years ago
|
||
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
| Reporter | ||
Comment 10•9 years ago
|
||
(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.
Comment 11•9 years ago
|
||
"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.
Description
•