Juerd Waalboer skribis 2007-03-30 21:53 (+0200): > Personally, I think that unpack with a byte-specific signature should > die, or at least warn, when its operand has the UTF8 flag set. I've since this post changed my mind, and think it should only warn if there are wide characters after attempting to downgrade first. Just like the existing "wide character in %s" warning. juerd@lanova:~$ perl -wle'$a = "foo\x{ff}"; utf8::upgrade($a); print $a' | hexdump -C 00000000 66 6f 6f ff 0a |foo..| 00000005 juerd@lanova:~$ perl -wle'$a = "foo\x{20ac}"; utf8::upgrade($a); print $a' | hexdump -C Wide character in print at -e line 1. 00000000 66 6f 6f e2 82 ac 0a |foo....| 00000007 -- korajn salutojn, juerd waalboer: perl hacker <juerd@juerd.nl> <http://juerd.nl/sig> convolution: ict solutions and consultancy <sales@convolution.nl> Ik vertrouw stemcomputers niet. Zie <http://www.wijvertrouwenstemcomputersniet.nl/>.Thread Previous | Thread Next