HTML5 Tracker

Diff (omit for latest revision)
Filter

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

SVNBugCommentTime (UTC)
3205If you find a declaration while decoding as UTF-16, then ignore it. It can only be correct if it is not giving a different encoding, in which case it's not useful anyway. (credit: kp)2009-06-06 01:28
Index: source
===================================================================
--- source	(revision 3204)
+++ source	(revision 3205)
@@ -73427,6 +73427,13 @@
    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 UTF-16 encoding, 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 a UTF-16 encoding, change it to
    UTF-8.</li>
 

|