Re: [whatwg/url] Editorial: make everything use percent-encode sets (#518)

@masinter :
> percent encoding takes a sequence of bytes and produces a sequence of (ASCII) characters

This spec defines both bytes-to-ASCII and codepoints-to-ASCII percent encoding functions. Both are needed by the URL parser (the latter calls the former).

> Keep in mind that percent encoding is used outside of URL processing as a kind of content-encoding.

I don't believe these terms are exported. The way it is defined here is specifically for use inside the URL parser / encoder. (For example, JavaScript's `encodeURIComponent` function defines its own encoding that _we believe_ is compatible with this one, but that doesn't call into here.)

Either way, I believe the set of functions defined here are adequate to serve any external use. If you want to encode a byte sequence (rather than a CP sequence), use the "percent-decode a byte sequence" algorithm above.

-- 
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/518#issuecomment-645216807

Received on Wednesday, 17 June 2020 07:56:52 UTC