Think about Loose Coupling | |
PerlMonks |
Re: Unicode strings internalsby Krambambuli (Curate) |
on May 10, 2013 at 16:49 UTC ( [id://1032983]=note: print w/replies, xml ) | Need Help?? |
Have a look into the results of
and then check the difference you see for BYTESTRING when running my $bytestring = encode ("UTF-8", "\x{444}\x{444}\x{444}\x{444}"); versus my $bytestring = "\x{444}\x{444}\x{444}\x{444}"; The Encode documentation has an Caveat about it: CAVEAT: When you run "$octets = encode("utf8", $string)", then $octets might not be equal to $string. Though both contain the same data, the UTF8 flag for $octets is always off. When you encode anything, the UTF8 flag on the result is always off, even when it contains a completely valid utf8 string. See "The UTF8 flag" below.
In Section
Seekers of Perl Wisdom
|
|