HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
681414676[Gecko] [Internet Explorer] [Opera] [Webkit] 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.2011-11-02 20:35
@@ -95612,40 +95612,40 @@ dictionary <dfn>StorageEventInit</dfn> : <span>EventInit</span> {
   <h5>Changing the encoding while parsing</h5>
 
   <p>When the parser requires the user agent to <dfn>change the
   encoding</dfn>, it must run the following steps. This might happen
   if the <span>encoding sniffing algorithm</span> described above
   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
-   that is already being used to interpret the input stream, then set
-   the <span title="concept-encoding-confidence">confidence</span> to
-   <i>certain</i> and abort these steps. This happens when the
-   encoding information found in the file matches what the
-   <span>encoding sniffing algorithm</span> determined to be the
-   encoding, and in the second pass through the parser if the first
-   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 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
+   <i>certain</i> and abort these steps. This happens when the
+   encoding information found in the file matches what the
+   <span>encoding sniffing algorithm</span> determined to be the
+   encoding, and in the second pass through the parser if the first
+   pass found that the encoding sniffing algorithm described in the
+   earlier section failed to find the right encoding.</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
    changing the converter on the fly, then the user agent may change
    to the new converter for the encoding on the fly. Set the
    <span>document's character encoding</span> and the encoding used to
    convert the input stream to the new encoding, set the <span
    title="concept-encoding-confidence">confidence</span> to
    <i>certain</i>, and abort these steps.</li>
 

|