[html5] r6814 - [giow] (3) When a page interpreted as UTF-8 has a <meta charset> saying UTF-16, [...]

whatwg at whatwg.org whatwg at whatwg.org
Wed Nov 2 13:35:58 PDT 2011


Author: ianh
Date: 2011-11-02 13:35:57 -0700 (Wed, 02 Nov 2011)
New Revision: 6814

Modified:
   complete.html
   index
   source
Log:
[giow] (3) When a page interpreted as UTF-8 has a <meta charset> saying UTF-16, the spec used to say to reload even though the encoding didn't change.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14676

Modified: complete.html
===================================================================
--- complete.html	2011-11-02 16:58:06 UTC (rev 6813)
+++ complete.html	2011-11-02 20:35:57 UTC (rev 6814)
@@ -84404,7 +84404,16 @@
   failed to find an encoding, or if it found an encoding that was not
   the actual encoding of the file.</p>
 
-  <ol><li>If the new encoding is identical or equivalent to the encoding
+  <ol><li>If the encoding that is already being used to interpret the
+   input stream is <a href=#a-utf-16-encoding>a UTF-16 encoding</a>, then set the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a> to
+   <i>certain</i> and abort these steps. The new encoding is ignored;
+   if it was anything but the same encoding, then it would be clearly
+   incorrect.</li>
+
+   <li>If the new encoding is <a href=#a-utf-16-encoding>a UTF-16 encoding</a>, change
+   it to UTF-8.</li>
+
+   <li>If the new encoding is identical or equivalent to the encoding
    that is already being used to interpret the input stream, then set
    the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a> to
    <i>certain</i> and abort these steps. This happens when the
@@ -84414,15 +84423,6 @@
    pass found that the encoding sniffing algorithm described in the
    earlier section failed to find the right encoding.</li>
 
-   <li>If the encoding that is already being used to interpret the
-   input stream is <a href=#a-utf-16-encoding>a UTF-16 encoding</a>, then set the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a> to
-   <i>certain</i> and abort these steps. The new encoding is ignored;
-   if it was anything but the same encoding, then it would be clearly
-   incorrect.</li>
-
-   <li>If the new encoding is <a href=#a-utf-16-encoding>a UTF-16 encoding</a>, change
-   it to UTF-8.</li>
-
    <li>If all the bytes up to the last byte converted by the current
    decoder have the same Unicode interpretations in both the current
    encoding and the new encoding, and if the user agent supports

Modified: index
===================================================================
--- index	2011-11-02 16:58:06 UTC (rev 6813)
+++ index	2011-11-02 20:35:57 UTC (rev 6814)
@@ -84404,7 +84404,16 @@
   failed to find an encoding, or if it found an encoding that was not
   the actual encoding of the file.</p>
 
-  <ol><li>If the new encoding is identical or equivalent to the encoding
+  <ol><li>If the encoding that is already being used to interpret the
+   input stream is <a href=#a-utf-16-encoding>a UTF-16 encoding</a>, then set the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a> to
+   <i>certain</i> and abort these steps. The new encoding is ignored;
+   if it was anything but the same encoding, then it would be clearly
+   incorrect.</li>
+
+   <li>If the new encoding is <a href=#a-utf-16-encoding>a UTF-16 encoding</a>, change
+   it to UTF-8.</li>
+
+   <li>If the new encoding is identical or equivalent to the encoding
    that is already being used to interpret the input stream, then set
    the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a> to
    <i>certain</i> and abort these steps. This happens when the
@@ -84414,15 +84423,6 @@
    pass found that the encoding sniffing algorithm described in the
    earlier section failed to find the right encoding.</li>
 
-   <li>If the encoding that is already being used to interpret the
-   input stream is <a href=#a-utf-16-encoding>a UTF-16 encoding</a>, then set the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a> to
-   <i>certain</i> and abort these steps. The new encoding is ignored;
-   if it was anything but the same encoding, then it would be clearly
-   incorrect.</li>
-
-   <li>If the new encoding is <a href=#a-utf-16-encoding>a UTF-16 encoding</a>, change
-   it to UTF-8.</li>
-
    <li>If all the bytes up to the last byte converted by the current
    decoder have the same Unicode interpretations in both the current
    encoding and the new encoding, and if the user agent supports

Modified: source
===================================================================
--- source	2011-11-02 16:58:06 UTC (rev 6813)
+++ source	2011-11-02 20:35:57 UTC (rev 6814)
@@ -95619,6 +95619,16 @@
 
   <ol>
 
+   <li>If the encoding that is already being used to interpret the
+   input stream is <span>a UTF-16 encoding</span>, then set the <span
+   title="concept-encoding-confidence">confidence</span> to
+   <i>certain</i> and abort these steps. The new encoding is ignored;
+   if it was anything but the same encoding, then it would be clearly
+   incorrect.</li>
+
+   <li>If the new encoding is <span>a UTF-16 encoding</span>, change
+   it to UTF-8.</li>
+
    <li>If the new encoding is identical or equivalent to the encoding
    that is already being used to interpret the input stream, then set
    the <span title="concept-encoding-confidence">confidence</span> to
@@ -95629,16 +95639,6 @@
    pass found that the encoding sniffing algorithm described in the
    earlier section failed to find the right encoding.</li>
 
-   <li>If the encoding that is already being used to interpret the
-   input stream is <span>a UTF-16 encoding</span>, then set the <span
-   title="concept-encoding-confidence">confidence</span> to
-   <i>certain</i> and abort these steps. The new encoding is ignored;
-   if it was anything but the same encoding, then it would be clearly
-   incorrect.</li>
-
-   <li>If the new encoding is <span>a UTF-16 encoding</span>, change
-   it to UTF-8.</li>
-
    <li>If all the bytes up to the last byte converted by the current
    decoder have the same Unicode interpretations in both the current
    encoding and the new encoding, and if the user agent supports




More information about the Commit-Watchers mailing list