in reply to Triple Byte UTF8 Characters
Decoding is the process of taking a string of bytes and returning the string of characters those bytes represent.
If you're getting that warning, it means you're passing something other than bytes to decode. It could mean you are decoding a string you already decoded, for example.
use strict; use warnings; use feature qw( say ); use open ':std', ':encoding(UTF-8)'; use Encode qw( decode ); $_ = "\xe4\xbb\x96"; say length; $_ = decode("UTF-8", $_); say length; $_ = decode("UTF-8", $_); # XXX Bug say length;
3 1 Cannot decode string with wide characters at [...].
|
|---|