- From: Anne van Kesteren <notifications@github.com>
- Date: Tue, 27 Mar 2018 00:43:42 -0700
- To: whatwg/encoding <encoding@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 27 March 2018 07:44:08 UTC
annevk 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. How about: > {{DOMString}} is used here so that a surrogate pair that is split between chunks can be reassembled into the appropriate scalar value. The behaviour is otherwise identical to {{USVString}}. In particular, lone surrogates will be replaced with U+FFFD. -- 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_r177333719
Received on Tuesday, 27 March 2018 07:44:08 UTC