Merge WHATWG change: Encode documents using utf-8. https://www.w3.org/Bugs/Public/show_bug.cgi?id=23364
--- a/Overview.html Wed Oct 23 14:04:13 2013 +0900
+++ b/Overview.html Wed Oct 23 14:33:03 2013 +0900
@@ -1228,39 +1228,23 @@
<dt id="dom-XMLHttpRequest-send-document"><a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-document" title="concept-document">document</a>
<dd>
- <p>Let <var title="">encoding</var> be the
- <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-document-encoding" title="concept-document-encoding">encoding</a>
- of <var title="">data</var>. If <var title="">encoding</var> is
- <a class="external" href="http://encoding.spec.whatwg.org/#utf-16le">utf-16le</a> or
- <a class="external" href="http://encoding.spec.whatwg.org/#utf-16be">utf-16be</a>, set
- <var title="">encoding</var> to
- <a class="external" href="http://encoding.spec.whatwg.org/#utf-8">utf-8</a>.
-
- <p>If <var title="">data</var> is an
- <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#html-document">HTML document</a>, let
- <var>mime type</var> be "<code>text/html</code>", or let
- <var>mime type</var> be "<code>application/xml</code>" otherwise. Then
- append "<code>;charset=<var>encoding</var></code>" to
+ <p>Let <var>encoding</var> be "<code title="">UTF-8</code>".
+
+ <p>If <var title="">data</var> is an <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#html-document">HTML document</a>, let
+ <var>mime type</var> be "<code>text/html</code>", or let <var>mime type</var> be
+ "<code>application/xml</code>" otherwise. Then append "<code>;charset=UTF-8</code>" to
<var>mime type</var>.
- <p><a class="external" href="http://html5.org/specs/dom-parsing.html#concept-serialize" title="concept-serialize">Serialize</a>
- <var title="">data</var>, and let the <a href="#request-entity-body">request entity body</a> be the result,
- <a class="external" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-obtain-unicode" title="convert a DOMString to a sequence of Unicode characters">converted to Unicode</a>
- and <a class="external" href="http://encoding.spec.whatwg.org/#encode" title="encode">encoded</a> using
- encoding <var>encoding</var>. Re-throw any exception this
- throws.</p>
-
- <p class="XXX">Should we only encode as utf-8? What happens in the face
- of an <a class="external" href="http://encoding.spec.whatwg.org/#error">error</a>?
-
- <p class="note">In particular, if the document cannot be serialized an
- "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception is
- thrown.</p>
-
- <p class="note">Subsequent changes to the
- <a class="external" href="http://dev.w3.org/2006/webapi/DOM4Core/#concept-document" title="concept-document">document</a> have
- no effect on what is transferred.
- </dd>
+ <p>Let the <a href="#request-entity-body">request entity body</a> be <var title="">data</var>,
+ <a class="external" href="http://html5.org/specs/dom-parsing.html#concept-serialize" title="concept-serialize">serialized</a>,
+ <a class="external" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-obtain-unicode" title="convert a DOMString to a sequence of Unicode characters">converted to Unicode</a>,
+ and <a class="external" href="http://encoding.spec.whatwg.org/#utf-8-encode" title="utf-8 encode">utf-8 encoded</a>.
+ Re-throw any exception
+ <a class="external" href="http://html5.org/specs/dom-parsing.html#concept-serialize" title="concept-serialize">serializing</a> throws.
+
+ <p class="note">If <var title="">data</var> cannot be
+ <a class="external" href="http://html5.org/specs/dom-parsing.html#concept-serialize" title="concept-serialize">serialized</a>, an
+ "<code class="external"><a href="http://dev.w3.org/2006/webapi/DOM4Core/#invalidstateerror">InvalidStateError</a></code>" exception is thrown.
<dt id="dom-XMLHttpRequest-send-a-string">a string
<dd>
@@ -1268,10 +1252,8 @@
<p>Let <var>mime type</var> be "<code>text/plain;charset=UTF-8</code>".</p>
- <p>Let the <a href="#request-entity-body">request entity body</a> be <var title="">data</var> ,
- <a class="external" href="http://encoding.spec.whatwg.org/#encode" title="encode">encoded</a> as
- <a class="external" href="http://encoding.spec.whatwg.org/#utf-8">utf-8</a>.
- </dd>
+ <p>Let the <a href="#request-entity-body">request entity body</a> be <var title="">data</var>,
+ <a class="external" href="http://encoding.spec.whatwg.org/#utf-8-encode" title="utf-8 encode">utf-8 encoded</a>.
<dt id="dom-XMLHttpRequest-send-FormData"><code><a href="#formdata">FormData</a></code>
<dd>
--- a/Overview.src.html Wed Oct 23 14:04:13 2013 +0900
+++ b/Overview.src.html Wed Oct 23 14:33:03 2013 +0900
@@ -1237,39 +1237,23 @@
<dt id="dom-XMLHttpRequest-send-document"><span data-anolis-spec=dom title=concept-document>document</span>
<dd>
- <p>Let <var title>encoding</var> be the
- <span data-anolis-spec=dom title=concept-document-encoding>encoding</span>
- of <var title>data</var>. If <var title>encoding</var> is
- <span data-anolis-spec=encoding>utf-16le</span> or
- <span data-anolis-spec=encoding>utf-16be</span>, set
- <var title>encoding</var> to
- <span data-anolis-spec=encoding>utf-8</span>.
-
- <p>If <var title>data</var> is an
- <span data-anolis-spec=dom>HTML document</span>, let
- <var>mime type</var> be "<code>text/html</code>", or let
- <var>mime type</var> be "<code>application/xml</code>" otherwise. Then
- append "<code>;charset=<var>encoding</var></code>" to
+ <p>Let <var>encoding</var> be "<code title>UTF-8</code>".
+
+ <p>If <var title>data</var> is an <span data-anolis-spec=dom>HTML document</span>, let
+ <var>mime type</var> be "<code>text/html</code>", or let <var>mime type</var> be
+ "<code>application/xml</code>" otherwise. Then append "<code>;charset=UTF-8</code>" to
<var>mime type</var>.
- <p><span data-anolis-spec=domps title=concept-serialize>Serialize</span>
- <var title>data</var>, and let the <span>request entity body</span> be the result,
- <span data-anolis-spec=webidl title="convert a DOMString to a sequence of Unicode characters">converted to Unicode</span>
- and <span data-anolis-spec=encoding title=encode>encoded</span> using
- encoding <var>encoding</var>. Re-throw any exception this
- throws.</p>
-
- <p class=XXX>Should we only encode as utf-8? What happens in the face
- of an <span data-anolis-spec=encoding>error</span>?
-
- <p class=note>In particular, if the document cannot be serialized an
- "<code data-anolis-spec=dom>InvalidStateError</code>" exception is
- thrown.</p>
-
- <p class=note>Subsequent changes to the
- <span data-anolis-spec=dom title=concept-document>document</span> have
- no effect on what is transferred.
- </dd>
+ <p>Let the <span>request entity body</span> be <var title>data</var>,
+ <span data-anolis-spec=domps title=concept-serialize>serialized</span>,
+ <span data-anolis-spec=webidl title="convert a DOMString to a sequence of Unicode characters">converted to Unicode</span>,
+ and <span data-anolis-spec=encoding title="utf-8 encode">utf-8 encoded</span>.
+ Re-throw any exception
+ <span data-anolis-spec=domps title=concept-serialize>serializing</span> throws.
+
+ <p class=note>If <var title>data</var> cannot be
+ <span data-anolis-spec=domps title=concept-serialize>serialized</span>, an
+ "<code data-anolis-spec=dom>InvalidStateError</code>" exception is thrown.
<dt id="dom-XMLHttpRequest-send-a-string">a string
<dd>
@@ -1277,10 +1261,8 @@
<p>Let <var>mime type</var> be "<code>text/plain;charset=UTF-8</code>".</p>
- <p>Let the <span>request entity body</span> be <var title>data</var> ,
- <span data-anolis-spec=encoding title=encode>encoded</span> as
- <span data-anolis-spec=encoding>utf-8</span>.
- </dd>
+ <p>Let the <span>request entity body</span> be <var title>data</var>,
+ <span data-anolis-spec=encoding title="utf-8 encode">utf-8 encoded</span>.
<dt id="dom-XMLHttpRequest-send-FormData"><code>FormData</code>
<dd>
--- a/data/xrefs/network/encoding.json Wed Oct 23 14:04:13 2013 +0900
+++ b/data/xrefs/network/encoding.json Wed Oct 23 14:33:03 2013 +0900
@@ -112,6 +112,7 @@
"utf-8 code point": "utf-8-code-point",
"utf-8 decode": "utf-8-decode",
"utf-8 decoder": "utf-8-decoder",
+ "utf-8 encode": "utf-8-encode",
"utf-8 encoder": "utf-8-encoder",
"utf-8 lower boundary": "utf-8-lower-boundary",
"windows-1250": "windows-1250",