On 8/3/22 06:26, Patrice Dumas wrote:
The standard does not seems to clear on the encoding to use for the %
encodings.  URI::Escape has uri_escape() and uri_escape_utf8.  My
feeling is that the best would be to use first encode to the output
encoding and then call URI::Escape uri_escape().

If I read https://metacpan.org/pod/URI::Escape correctly,
uri_escape_utf8 is equivalent to utf8::encode followed by uri_escape.

For html/xhtml output (including epub) I think we should keep it simple:
always emit utf8.  The input to url-encoding is a sequence
of utf8-bytes. So whether to use uri_escape_utf8 or uri_escape
depends on whether conversion to utf8 has already been done.
--
        --Per Bothner
[email protected]   http://per.bothner.com/

Reply via email to