Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[giow] (0) Require an encoding declaration.
Affected topics: HTML git-svn-id: http://svn.whatwg.org/webapps@7160 340c8d12-0b0e-0410-8428-c7bf67bfef74
- Loading branch information
Showing
with
28 additions
and 15 deletions.
- +9 −5 complete.html
- +9 −5 index
- +10 −5 source
the other is <meta charset>, and the encoding is UTF-8. --> | ||
|
||
<p>If an <a href=#html-documents title="HTML documents">HTML document</a> does not | ||
start with a BOM, and if its encoding is not explicitly given by | ||
<a href=#content-type title=Content-Type>Content-Type metadata</a>, and the | ||
document is not <a href=#an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a>, then the | ||
start with a BOM, and its encoding is not explicitly given by <a href=#content-type title=Content-Type>Content-Type metadata</a>, and the document | ||
is not <a href=#an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a>, then the | ||
character encoding used must be an <a href=#ascii-compatible-character-encoding>ASCII-compatible character | ||
encoding</a>, and, in addition, if that encoding isn't US-ASCII | ||
itself, then the encoding must be specified using a | ||
encoding</a>, and the encoding must be specified using a | ||
<code><a href=#the-meta-element>meta</a></code> element with a <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute or a | ||
<code><a href=#the-meta-element>meta</a></code> element with an <code title=attr-meta-http-equiv><a href=#attr-meta-http-equiv>http-equiv</a></code> attribute in the | ||
<a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration | ||
state</a>.</p> | ||
|
||
<p class=note>A character encoding declaration is required (either | ||
in the <a href=#content-type title=Content-Type>Content-Type metadata</a> 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 <a href=#an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a>, the | ||
document must not have a <a href=#character-encoding-declaration>character encoding | ||
declaration</a>. (In this case, the source is already decoded, |
the other is <meta charset>, and the encoding is UTF-8. --> | ||
|
||
<p>If an <a href=#html-documents title="HTML documents">HTML document</a> does not | ||
start with a BOM, and if its encoding is not explicitly given by | ||
<a href=#content-type title=Content-Type>Content-Type metadata</a>, and the | ||
document is not <a href=#an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a>, then the | ||
start with a BOM, and its encoding is not explicitly given by <a href=#content-type title=Content-Type>Content-Type metadata</a>, and the document | ||
is not <a href=#an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a>, then the | ||
character encoding used must be an <a href=#ascii-compatible-character-encoding>ASCII-compatible character | ||
encoding</a>, and, in addition, if that encoding isn't US-ASCII | ||
itself, then the encoding must be specified using a | ||
encoding</a>, and the encoding must be specified using a | ||
<code><a href=#the-meta-element>meta</a></code> element with a <code title=attr-meta-charset><a href=#attr-meta-charset>charset</a></code> attribute or a | ||
<code><a href=#the-meta-element>meta</a></code> element with an <code title=attr-meta-http-equiv><a href=#attr-meta-http-equiv>http-equiv</a></code> attribute in the | ||
<a href=#attr-meta-http-equiv-content-type title=attr-meta-http-equiv-content-type>Encoding declaration | ||
state</a>.</p> | ||
|
||
<p class=note>A character encoding declaration is required (either | ||
in the <a href=#content-type title=Content-Type>Content-Type metadata</a> 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 <a href=#an-iframe-srcdoc-document>an <code>iframe</code> <code title=attr-iframe-srcdoc>srcdoc</code> document</a>, the | ||
document must not have a <a href=#character-encoding-declaration>character encoding | ||
declaration</a>. (In this case, the source is already decoded, |
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 | ||
title="attr-meta-http-equiv">http-equiv</code> attribute in the | ||
<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 |