Re: [whatwg/url] Add string UTF-8 percent encode (#503)

@domenic commented on this pull request.



> @@ -197,9 +201,17 @@ U+005B ([) to U+005E (^), inclusive, and U+007C (|).
  concatenated, in the same order.
 </ol>
 
-<p class="note no-backref">The <a><code>application/x-www-form-urlencoded</code></a> format's
-<a lt="urlencoded byte serializer">byte serializer</a> and the <a>URL parser</a>'s
-<a>query state</a> use <a>percent encode</a> directly.
+<p>To <dfn>string UTF-8 percent encode</dfn> a <a for=/>string</a> <var>input</var> using a

IMO this should also be named "UTF-8 percent encode", distinguishing between the two with `for="code point"` vs. `for=string`. I.e., you should overload the algorithm on its input type.

This is especially intuitive here because the reader then blurs the difference between code points and single-character strings, which is a reasonable mental model that matches many programming languages.

-- 
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/url/pull/503#pullrequestreview-409362943

Received on Monday, 11 May 2020 17:07:36 UTC