Help for this page
my $utf8; { local $^W; # warnings are thrown when unpacking ... deal_with_malformed_utf8() if length $utf8 == 0 and length $raw != 0;
use Encode; my $string = decode_utf8($bytes); ... utf8::decode($string = $bytes) # of course, you can just or deal_with_malformed_utf8();# use one variable, and not # keep the raw bytes.