On Nov 26, 2010, at 22:03 , Reverend Chip wrote: > Hm, would malformed utf8 on stdin come in without validation? I never > do utf8 I/O so I don't know. If you use the ':utf8' IO layer then perl just slaps the SvUTF8-flag on whatever it receives. You need the ':encoding(utf8)' flag for perl to be more careful in its decoding. Demo: $ perl -le 'print "\xA0"' | perl -e 'binmode(STDIN, ":utf8"); use Devel::Peek; Dump(<STDIN>)' SV = PV(0x801838) at 0x8039e0 REFCNT = 1 FLAGS = (TEMP,POK,pPOK,UTF8) PV = 0x207f20 "\240\n"\0 [UTF8 "\x{280}\n"] CUR = 2 LEN = 3 Regard, GisleThread Previous | Thread Next