Subject: | _utf8_on() does not work for tainted values |
$ perl -MEncode=_utf8_on,is_utf8 -le '$_=shift;Encode::_utf8_on$_;print
is_utf8($_)||"no"' foo
1
$ perl -T -MEncode=_utf8_on,is_utf8 -le
'$_=shift;Encode::_utf8_on$_;print is_utf8($_)||"no"' foo
no
While there may be good reasons for not having the utf8 bit blindly
activated for tainted data, I think this should at least be documented,
and maybe the function should emit a warning or even die when called for
a tainted value.
Also see <http://rt.cpan.org/Ticket/Display.html?id=41161> on this issue.
Regards,
fany