Alex Christensen wrote:
That is certainly a choice you can make, but at some point you may run into issues with people trying to give your library input like http://example.com/💩 http://example.com/%F0%9F%92%A9 and expecting the URL parser to normalize it to http://example.com/%F0%9F%92%A9 http://example.com/%F0%9F%92%A9 for you like it does in some other URL libraries.
Assuming this is supported, it raises the question of what the parser would be expected to do with http://example.com/💩/%F0%9F%92%A9. Should it encode the percents, under the assumption that they are literal because everything is non-encoded? Or should it leave the percents as-is and only encode the emoji? If the use case is "the user typed or pasted something into the address bar", I suppose a best-effort DWIM (e.g. option 2) makes more sense. But in other scenarios, option 1 might.