$ perl -wE' use Devel::Peek; use utf8; use Encode; my $str = "รค"; my $substr = substr($str, 0, 1); Dump $substr; no utf8; $substr = substr($str, 0, 1); Dump $substr; ' SV = PV(0x8af9780) at 0x8b16aa0 REFCNT = 1 FLAGS = (PADMY,POK,pPOK,UTF8) PV = 0x8b1a9a8 "\303\244"\0 [UTF8 "\x{e4}"] CUR = 2 LEN = 4 SV = PV(0x8af9780) at 0x8b16aa0 REFCNT = 1 FLAGS = (PADMY,POK,pPOK,UTF8) PV = 0x8b1a9a8 "\303\244"\0 [UTF8 "\x{e4}"] CUR = 2 LEN = 4