Skip to content
This repository has been archived by the owner on Jul 30, 2019. It is now read-only.

Commit

Permalink
Reinstate legacy encoding information (#1504)
Browse files Browse the repository at this point in the history
Fixes #1039
  • Loading branch information
edent authored and LJWatson committed Jul 9, 2018
1 parent e78e8a8 commit b7b1a01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion sections/iana.include
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,11 @@
:: The <code>charset</code> parameter may be provided to specify the
<a>document's character encoding</a>, overriding any
[=character encoding declarations=] in the document other than a Byte Order Mark (BOM).
The parameter's value must be an <a>ASCII case-insensitive</a> match for the string
For newly created documents, the parameter's value must be an <a>ASCII case-insensitive</a> match for the string
"<code>utf-8</code>".
For legacy documents, the character encoding name given must be an
<a>ASCII case-insensitive</a> match for one of the <a lt="character encoding">labels</a>
of the <a>character encoding</a> used to serialize the file. [[!ENCODING]]
: Encoding considerations:
:: 8bit (see the section on [=character encoding declarations=])
: Security considerations:
Expand Down
6 changes: 5 additions & 1 deletion sections/semantics-document-metadata.include
Original file line number Diff line number Diff line change
Expand Up @@ -1417,7 +1417,7 @@
Regardless of whether a character encoding declaration is present or not, the actual character
encoding used to encode the document must be <a>UTF-8</a>. [[!ENCODING]]

The following restrictions apply to [=character encoding declarations=]:
The following restrictions apply to all [=character encoding declarations=]:

* The character encoding declaration must be serialized without the use of
<a>character references</a> or character escapes of any kind.
Expand All @@ -1426,6 +1426,10 @@
* Due to a number of restrictions on <{meta}> elements, there can only be one
<code>meta</code>-based character encoding declaration per document.

For legacy documents, the character encoding name given must be an <a>ASCII case-insensitive</a>
match for one of the <a lt="character encoding">labels</a> of the <a>character encoding</a> used
to serialize the file. [[!ENCODING]]

Authoring tools must default to using <a>UTF-8</a> for newly-created documents. [[!ENCODING]]

If an <a>HTML document</a> does not start with a BOM, and its <a>encoding</a> is not explicitly
Expand Down

0 comments on commit b7b1a01

Please sign in to comment.