$ perl -wE' use utf8; use CGI; use Devel::Peek; use Encode; my $cgi = CGI->new; my $test = $cgi->param("test"); Dump $test; my $x = substr($test, 0, 1); Dump $x;' "test=%C3%A4" SV = PVMG(0x81a6fe8) at 0x81ada78 REFCNT = 1 FLAGS = (PADMY,POK,pPOK) IV = 0 NV = 0 PV = 0x8309588 "\303\244"\0 CUR = 2 LEN = 4 SV = PV(0x82a8758) at 0x82aa8c0 REFCNT = 1 FLAGS = (POK,pPOK) PV = 0x8193620 "\303"\0 CUR = 1 LEN = 4