On Thu, Aug 04, 2022 at 08:30:01PM +0100, Gavin Smith wrote: > On 8/3/22, Patrice Dumas <[email protected]> wrote: > > > > But that was > > not really myquestion, my question was more on whether we should use the > > output encoding to encode string before doing the URI::Escape call, or > > always use UTF-8, even if the document encoding is not UTF-8. > > Are there browsers in non UTF-8 locales manage to follow links percent > encoded in non UTF-8 encodings? This seems like a very niche case.
To me the question is not the locales of the browser, but the encoding of the HTML file. If the encoding is ISO latin 1 as in: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> Then it seems to me that the URI::Escape call should be on a ISO latin 1 encoded string. But I am not sure. -- Pat
