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 ...

  • Comment on Re: Can't decode ill-formed UTF-8 octet sequence <FF> at /usr/share/perl5/CGI.pm line 1116.
  • Select or Download Code

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

    I do know. I use lighttpd and not apache. It has only two modules to run CGI -- cgi and fastcgi. And i do not know what stands behind both.

    Thank you for the great code!

    On CLOSED, one here says one, another -- another. I believe since i will listen to you, the first will explain that his way. So, i quit w/ status keeping on my topics.