HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/4138

File a bug

SVNBugCommentTime (UTC)
4138[Gecko] [Opera] [Webkit] Drop support for anything but UTF-8 from Workers.2009-10-14 10:55
Index: source
===================================================================
--- source	(revision 4137)
+++ source	(revision 4138)
@@ -71548,96 +71548,7 @@
   represents.</p>
 
 
-  <h4>Decoding scripts</h4>
 
-  <p>When a user agent is to <dfn>decode a script resource</dfn> to
-  obtain its source in Unicode, it must run the following steps:</p>
-
-  <ol>
-
-   <li>
-
-    <p>Let <var title="">character encoding</var> be <i
-    title="">unknown</i>.</p>
-
-   </li>
-
-   <li>
-
-    <p>For each of the rows in the following table, starting with the
-    first one and going down, if the resource has as many or more
-    bytes available than the number of bytes in the first column, and
-    the first bytes of the resource match the bytes given in the first
-    column, then let <var title="">character encoding</var> be the
-    encoding given in the cell in the second column of that row:</p>
-
-    <!-- this table is present in several forms in this file; keep them in sync -->
-    <table>
-     <thead>
-      <tr>
-       <th>Bytes in Hexadecimal
-       <th>Encoding
-     <tbody>
-<!-- nobody uses this
-      <tr>
-       <td>00 00 FE FF
-       <td>UTF-32BE
-      <tr>
-       <td>FF FE 00 00
-       <td>UTF-32LE
--->
-      <tr>
-       <td>FE FF
-       <td>UTF-16BE
-      <tr>
-       <td>FF FE
-       <td>UTF-16LE
-      <tr>
-       <td>EF BB BF
-       <td>UTF-8
-<!-- nobody uses this
-      <tr>
-       <td>DD 73 66 73
-       <td>UTF-EBCDIC
--->
-    </table>
-
-    <p class="note">This step looks for Unicode Byte Order Marks
-    (BOMs).</p>
-
-   </li>
-
-   <li>
-
-    <p>If <var title="">character encoding</var> is still <i
-    title="">unknown</i>, apply the <span>algorithm for extracting an
-    encoding from a Content-Type</span> to the resource's <span
-    title="Content-Type">Content Type metadata</span>; if this returns
-    an encoding, and the user agent supports that encoding, then let
-    <var title="">character encoding</var> be that encoding.</p>
-
-   </li>
-
-   <li>
-
-    <p>If <var title="">character encoding</var> is still <i
-    title="">unknown</i>, then let <var title="">character
-    encoding</var> be UTF-8.</p>
-
-   </li>
-
-   <li>
-
-    <p>Convert the resource to Unicode using the character encoding
-    given by <var title="">character encoding</var>.</p>
-
-    <p>Return the text that is so obtained.</p>
-
-   </li>
-
-  </ol>
-
-
   <h4>The event loop</h4>
 
   <p>Each <code>WorkerGlobalScope</code> object has an <span>event
@@ -71795,8 +71706,8 @@
     named <code title="event-error">error</code> at that
     object. Abort these steps.</p>
 
-    <p>If the attempt succeeds, then <span title="decode a script
-    resource">decode the script resource</span> to obtain its <var
+    <p>If the attempt succeeds, then convert the script resource to
+    Unicode by assuming it was encoded as UTF-8, to obtain its <var
     title="">source</var>.</p>
 
     <p>Let <var title="">language</var> be JavaScript.</p>
@@ -72636,8 +72547,8 @@
       <code>NETWORK_ERR</code> exception and abort all these
       steps.</p>
 
-      <p>If the attempt succeeds, then <span title="decode a script
-      resource">decode the script resource</span> to obtain its <var
+      <p>If the attempt succeeds, then convert the script resource to
+      Unicode by assuming it was encoded as UTF-8, to obtain its <var
       title="">source</var>.</p>
 
       <p>Let <var title="">language</var> be JavaScript.</p>

|