perl -wE' use Encode; use Devel::Peek; my $string = "รค"; Dump $string; $string = decode_utf8($string); Dump $string;' SV = PV(0xbbca90) at 0xbe2878 REFCNT = 1 FLAGS = (PADMY,POK,IsCOW,pPOK) PV = 0xbe5530 "\303\244"\0 CUR = 2 LEN = 10 COW_REFCNT = 1 SV = PV(0xbbca90) at 0xbe2878 REFCNT = 1 FLAGS = (PADMY,POK,pPOK,UTF8) PV = 0xbddf80 "\303\244"\0 [UTF8 "\x{e4}"] CUR = 2 LEN = 10