also in 'text' BOM goes before everything else
authorAnne van Kesteren <annevk@opera.com>
Thu, 16 Feb 2012 11:48:44 +0100
changeset 43 a1dc9d4fbe50
parent 42 22d102c71ee5
child 44 063d0f0d429d
also in 'text' BOM goes before everything else
Overview.html
Overview.src.html
--- a/Overview.html	Thu Feb 16 11:44:10 2012 +0100
+++ b/Overview.html	Thu Feb 16 11:48:44 2012 +0100
@@ -2405,7 +2405,23 @@
    <li><p>If the <a href="#response-entity-body">response entity body</a> is null, return the empty
    string and terminate these steps.</p>
 
-   <li><p>Let <var>charset</var> be the <a href="#final-charset">final charset</a>.</li>
+   <li><!-- XXX this needs to move to Encoding -->
+    <p>For each of the rows in the following table, starting with the first
+    one and going down, if the first bytes of the
+    <a href="#response-entity-body">response entity body</a> match the bytes given in the first
+    column, then let <var>charset</var> be the encoding given in the cell in
+    the second column of that row. Otherwise, let <var>charset</var> be
+    null.
+
+    <table>
+     <tr><th>Bytes<th>Encoding
+     <tr><td>0xFE 0xFF<td>UTF-16BE
+     <tr><td>0xFF 0xFE<td>UTF-16LE
+     <tr><td>0xEF 0xBB 0xBF<td>UTF-8
+    </table>
+
+   <li><p>If <var>charset</var> is null, let <var>charset</var> be the
+   <a href="#final-charset">final charset</a>.
 
    <li>
     <p>If <code title="dom-XMLHttpRequest-responseType"><a href="#dom-xmlhttprequest-responsetype">responseType</a></code> is
@@ -2422,24 +2438,9 @@
     <code title="dom-XMLHttpRequest-responseType"><a href="#dom-xmlhttprequest-responsetype">responseType</a></code> value
     "<code title="">text</code>" simple.
 
-   <li>
-    <p>If <var>charset</var> is null then, for each of the rows in the
-    following table, starting with the first one and going down, if the first
-    bytes of the <a href="#response-entity-body">response entity body</a> match the bytes given in
-    the first column, then let <var>charset</var> be the encoding given in
-    the cell in the second column of that row. If there is no match
-    <var>charset</var> remains null.
-
-    <table>
-     <tr><th>Bytes<th>Encoding
-     <tr><td>0xFE 0xFF<td>UTF-16BE
-     <tr><td>0xFF 0xFE<td>UTF-16LE
-     <tr><td>0xEF 0xBB 0xBF<td>UTF-8
-    </table>
-
-   <li><p>If <var>charset</var> is null let <var>charset</var> be
-   UTF-8.</li>
-
+   <li><p>If <var>charset</var> is null, let <var>charset</var> be UTF-8.
+
+   <!-- XXX this needs to move to Encoding -->
    <li><p>Return the result of decoding the
    <a href="#response-entity-body">response entity body</a> using <var>charset</var>. Replace bytes
    or sequences of bytes that are not valid according to the
--- a/Overview.src.html	Thu Feb 16 11:44:10 2012 +0100
+++ b/Overview.src.html	Thu Feb 16 11:48:44 2012 +0100
@@ -2413,7 +2413,23 @@
    <li><p>If the <span>response entity body</span> is null, return the empty
    string and terminate these steps.</p>
 
-   <li><p>Let <var>charset</var> be the <span>final charset</span>.</p></li>
+   <li><!-- XXX this needs to move to Encoding -->
+    <p>For each of the rows in the following table, starting with the first
+    one and going down, if the first bytes of the
+    <span>response entity body</span> match the bytes given in the first
+    column, then let <var>charset</var> be the encoding given in the cell in
+    the second column of that row. Otherwise, let <var>charset</var> be
+    null.
+
+    <table>
+     <tr><th>Bytes<th>Encoding
+     <tr><td>0xFE 0xFF<td>UTF-16BE
+     <tr><td>0xFF 0xFE<td>UTF-16LE
+     <tr><td>0xEF 0xBB 0xBF<td>UTF-8
+    </table>
+
+   <li><p>If <var>charset</var> is null, let <var>charset</var> be the
+   <span>final charset</span>.
 
    <li>
     <p>If <code title=dom-XMLHttpRequest-responseType>responseType</code> is
@@ -2430,24 +2446,9 @@
     <code title=dom-XMLHttpRequest-responseType>responseType</code> value
     "<code title>text</code>" simple.
 
-   <li>
-    <p>If <var>charset</var> is null then, for each of the rows in the
-    following table, starting with the first one and going down, if the first
-    bytes of the <span>response entity body</span> match the bytes given in
-    the first column, then let <var>charset</var> be the encoding given in
-    the cell in the second column of that row. If there is no match
-    <var>charset</var> remains null.
-
-    <table>
-     <tr><th>Bytes<th>Encoding
-     <tr><td>0xFE 0xFF<td>UTF-16BE
-     <tr><td>0xFF 0xFE<td>UTF-16LE
-     <tr><td>0xEF 0xBB 0xBF<td>UTF-8
-    </table>
-
-   <li><p>If <var>charset</var> is null let <var>charset</var> be
-   UTF-8.</p></li>
-
+   <li><p>If <var>charset</var> is null, let <var>charset</var> be UTF-8.
+
+   <!-- XXX this needs to move to Encoding -->
    <li><p>Return the result of decoding the
    <span>response entity body</span> using <var>charset</var>. Replace bytes
    or sequences of bytes that are not valid according to the