in reply to Can't decode ill-formed UTF-8 octet sequence <FF> at /usr/share/perl5/CGI.pm line 1116.
Are you running under mod_perl?
I cannot replicate under cli :)
#!/usr/bin/perl -T use strict; use warnings; use CGI; use CGI::Carp qw ( fatalsToBrowser ); use Data::Dump qw/ pp /; my $bom = "bom=\xEF\xBB\xBF"; my $junk = "junk=\xC3\x2E"; my $fun = sub { my $q = CGI->new( "$bom;$junk"); my $qbom = $q->param('bom'); my $qjunk = $q->param('junk'); $q->charset('UTF-8'); print $q->header('text/plain'), join "\n", pp($bom,$qbom),$qbom, p +p($junk,$qjunk),$qjunk, "\n"; }; $fun->(); local $CGI::PARAM_UTF8 = $CGI::PARAM_UTF8 = 1; binmode STDOUT, ':encoding(UTF-8)'; $fun->(); __END__
Also that [CLOSED] stuff shouldn't have [] you should <p><b>update:</b> solved it , it was ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Can't decode ill-formed UTF-8 octet sequence <FF> at /usr/share/perl5/CGI.pm line 1116.
by nikolay (Beadle) on Dec 31, 2016 at 10:27 UTC |