Hi David. Thanks for the quick responses.
David Graff wrote:
> On closer inspection of the source, I see that the "unescape"
> function can accept a string like /u([0-9a-fA-F]{4})/
Yea more or less. "%u00b0" for example.
> and it will correctly set the utf8 flag
Not AFAICT:
DB<1> x Encode::is_utf8(CGI::Util::unescape("%u00b0"))
0 ''
> Perhaps it might be time to add an optional argument to "escape",
Is %uXXXX officially sanctioned somewhere?
An optional argument is good. But if the scalar passed to escape()
has the utf8 flag set it seems to me we could "do the right thing"
automatically.
-Stephen
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.