|
Boost : |
From: Peter Dimov (pdimov_at_[hidden])
Date: 2021-10-12 20:49:24
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/%f0%9f%92© <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/%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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk