Hi,
As I say I try to decode the CGI params:
use Encode;
my $chapid = CGI::param('chap-id');
my $chapchalange = CGI::param('chap-challenge');
$chapid = Encode::decode('CP1251', $chapid, Encode::FB_CROAK);
$chapchalange = Encode::decode('CP1251', $chapchalange, Encode::FB_CRO
+AK);
The only thing that changes is this:
---------print chapid to STDERR-----------------
\027
---------Dump chapid before decode----------
SV = PVMG(0x80d0988e8) at 0x80d3234e0
REFCNT = 1
FLAGS = (PADMY,POK,pPOK)
IV = 0
NV = 0
PV = 0x80d35f118 "\\027"\0
CUR = 4
LEN = 8
---------Dump chapid after decode----------
SV = PVMG(0x80d0988e8) at 0x80d3234e0
REFCNT = 1
FLAGS = (PADMY,POK,pPOK,UTF8)
IV = 0
NV = 0
PV = 0x80d35f5d8 "\\027"\0 [UTF8 "\\027"]
CUR = 4
LEN = 8
If I change the encoding in 'decode' from 'CP1251' to 'UTF-8' nothing really happens.
Best regards,
Kaloyan Iliev |