W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > September 2010

[Bug 10656] The spec says that for scripts the BOM overrides the HTTP charset

From: <bugzilla@jessica.w3.org>
Date: Mon, 20 Sep 2010 03:34:37 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1OxX9J-0003HE-Gc@jessica.w3.org>

Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
                 CC|                            |bzbarsky@mit.edu
            Summary|The spec says that @charset |The spec says that for
                   |overrides the HTTP charset  |scripts the BOM overrides
                   |and doesn't allow examining |the HTTP charset
                   |the BOM                     |

--- Comment #1 from Boris Zbarsky <bzbarsky@mit.edu>  2010-09-20 03:34:37 ---
Specifically, section 4.3.1 has this to say in step 5 of "running a script":

  If the script element has a charset attribute, then let the script block's
  character encoding for this script element be the encoding given by the
  charset attribute.

  Otherwise, let the script block's character encoding for this script element
  be the same as the encoding of the document itself.

Then in step 9 we have:

  Once the resource's Content Type metadata is available, if it ever is, apply
  the algorithm for extracting an encoding from a Content-Type to it. If this
  returns an encoding, and the user agent supports that encoding, then let the
  script block's character encoding be that encoding.

So far so good.  But then step 10 says to fetch the script and execute the
script block, and the "executing a script block" stuff has a "If the script is
from an external file and the script block's type is a text-based language"
section which says to examine the BOM and use the resulting value if a BOM is
found, no matter what the HTTP headers said.
That's certainly not what Gecko does.  Does some other browser do this?  Is it
what we want to happen here?

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Monday, 20 September 2010 03:34:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:24 UTC