I have this error, and although, once this script worked, I cannot myself figure out what to do:
Cannot decode string with wide characters at /usr/lib/perl/5.10/Encode
+.pm line 174.
My input is UTF-8 from the HTML form, and the script is roughly this one:
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
use CGI qw(-utf8);
use Encode;
use encoding 'utf8';
use CGI::Carp qw(croak fatalsToBrowser);
# etc...
$| = 1;
binmode(STDOUT, ":utf8");
binmode(STDIN, ":utf8");
my $q = new CGI;
croak("It works yet...");
my $referer_url = "@{[ $q->url ]}";
croak("Cannot decode string... error before this line.");
In general, if a value from the HTML textform contains one UTF-8 character, I get that error.
Any help is appreciated.