[Webkit-unassigned] [Bug 66085] The HTML parser doesn't ignore the BOM when the HTTP charset=foo conflicts with it

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Aug 13 05:59:55 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=66085





--- Comment #3 from Leif Halvard Silli <xn--mlform-iua at xn--mlform-iua.no>  2011-08-13 05:59:55 PST ---
(In reply to comment #2)
> Even the linked test's title says "UTF-8 encoded document with erroneous external encoding".

It is mostly just a boilerplate text.

> We display a UTF-8 document as UTF-8 - would it be better for users is we displayed garbage?

FIRSTLY: what you state here about what you do, is only 50% true. 

    Because, if a page does *not* contain the BOM but still is UTF-8 encoded, then Webkit does EITHER listen to the HTTP charset OR, if lacking, it does default to WINDOWS-1252'. And this despite that UTF-8 is easy to detect. Thus, for UTF-8 pages which are lackign the BOM, you seem to favor something other than what is better for users. So, unless there an effort to change this so that UTF-8 is used whenever it can be detected (also when it conflicts with HTTP), then I don't feel that this argument carry as much weight as it otherwise would have. 

    NOTE: When HTTP charset=foo is lacking, then Chrome and Opera do detect UTF-8, instead of defaulting to WINDOWS-1252. Webkit should behave the same way.

SECONDLY: As for 50% where your statement is true (that is: when there is a BOM), then the arguments for changing Webkit are:

 1) To do what the specs (HTTP and HTML5) says
 2) To promote interoperability with Firefox, Opera and more
     (at the expence of IE interoperability)
 3) To promote interoperability (think Polyglot Markup) with how XML 
     parsers should operate (they do not always behave that way though)

That said, 

  1) HTML parsers differs - should they all adobt IE/Webkit behaviour?
  2) May be the HTTP spec should change?
  3) May be the HTML5 spec should change?
  4) May be the XML 1.0 spec should change?

If you think that the Webkit behaviour should not change, then I encourage you to add your voice in support of changing HTML5 - this can e.g. by done by stating Webkit's position in the W3_bug_12897: http://www.w3.org/Bugs/Public/show_bug.cgi?id=12897

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list