HTML5 Tracker

Diff (omit for latest revision)
Filter

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

SVNBugCommentTime (UTC)
7160[Gecko] [Internet Explorer] [Opera] [Webkit] Require an encoding declaration.2012-06-29 20:42
Index: source
===================================================================
--- source	(revision 7159)
+++ source	(revision 7160)
@@ -16710,13 +16710,12 @@
   the other is <meta charset>, and the encoding is UTF-8. -->
 
   <p>If an <span title="HTML documents">HTML document</span> does not
-  start with a BOM, and if its encoding is not explicitly given by
-  <span title="Content-Type">Content-Type metadata</span>, and the
-  document is not <span>an <code>iframe</code> <code
+  start with a BOM, and its encoding is not explicitly given by <span
+  title="Content-Type">Content-Type metadata</span>, and the document
+  is not <span>an <code>iframe</code> <code
   title="attr-iframe-srcdoc">srcdoc</code> document</span>, then the
   character encoding used must be an <span>ASCII-compatible character
-  encoding</span>, and, in addition, if that encoding isn't US-ASCII
-  itself, then the encoding must be specified using a
+  encoding</span>, and the encoding must be specified using a
   <code>meta</code> element with a <code
   title="attr-meta-charset">charset</code> attribute or a
   <code>meta</code> element with an <code
@@ -16724,6 +16723,12 @@
   <span title="attr-meta-http-equiv-content-type">Encoding declaration
   state</span>.</p>
 
+  <p class="note">A character encoding declaration is required (either
+  in the <span title="Content-Type">Content-Type metadata</span> or
+  explicitly in the file) even if the encoding is US-ASCII, because an
+  encoding is needed to process non-ASCII characters entered by the
+  user in forms, in URLs generated by scripts, and so forth.</p>
+
   <p>If the document is <span>an <code>iframe</code> <code
   title="attr-iframe-srcdoc">srcdoc</code> document</span>, the
   document must not have a <span>character encoding

|