- From: Adam Rice <notifications@github.com>
- Date: Mon, 26 Mar 2018 09:55:26 +0000 (UTC)
- To: whatwg/encoding <encoding@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 26 March 2018 09:55:55 UTC
ricea commented on this pull request.
> @@ -1314,6 +1528,120 @@ must run these steps:
</ol>
</ol>
+<hr>
+
+<p>The <dfn id=concept-te-encode-and-enqueue>encode and enqueue a chunk</dfn> algorithm, given a
+{{TextEncoder}} <var>encForTransform</var> and <var>chunk</var>, runs these steps:
+
+<ol>
+ <li><p>Let <var>input</var> be the result of <a lt="converted to an IDL value">converting</a>
+ <var>chunk</var> to a {{DOMString}}. If this throws an exception, then return a promise rejected
+ with that exception.
+
+ <p class=note>{{DOMString}} is used here so that a surrogate pair that is split between chunks can
+ be correctly reassembled into the appropriate code point in the output. The behaviour is otherwise
+ identical to {{USVString}}. In particular, replacement characters will be used where necessary to
+ make the output valid UTF-8.
Thanks. How is the updated version? I'm not sure whether "valid UTF-8" or "well-formed UTF-8" is better.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/encoding/pull/127#discussion_r177035976
Received on Monday, 26 March 2018 09:55:55 UTC