in reply to Re^4: A UTF8 round trip with MySQL
in thread A UTF8 round trip with MySQL
I realise the quoted text is from blead but are you saying the :utf8 IO layer in earlier perls (say 5.8.8 for example) just sets the utf-8 flag without checking the encoding? If so then I don't understand the following in 5.8.8
od -x x.data 0000000 8181 8282 8383 000a
use strict; use warnings; my $fh; open ($fh, "<:utf8", "x.data"); my $img = ''; while (<$fh>) {$img .= $_;}
produces 1 utf8 "\x81" does not map to Unicode at invalid_utf8.pl line 8, <$fh> line 1.
but changing the io layer to :encoding(UTF8) seems to make no difference other than reporting that same error 6 times, one for each byte.
|
|---|