Hi, Monks
I'm getting error "Wide character in subroutine entry at C:/Perl/site/lib/Encode.pm line 194." working with one site (via WWW::Mechanize). Here is piece of code in Encode.pm:
sub from_to($$$;$) { my ( $string, $from, $to, $check ) = @_; return undef unless defined $string; $check ||= 0; my $f = find_encoding($from); unless ( defined $f ) { require Carp; Carp::croak("Unknown encoding '$from'"); } my $t = find_encoding($to); unless ( defined $t ) { require Carp; Carp::croak("Unknown encoding '$to'"); } my $uni = $f->decode($string); $_[0] = $string = $t->encode( $uni, $check ); return undef if ( $check && length($uni) ); return defined( $_[0] ) ? length($string) : undef; }
So the main problem in
my $uni = $f->decode($string);
Server response is "text/html; charset=UTF-8" so i don't understand why i get this error.
Can you give me some hints? How i can fix it?
P.S. WWW::Mechanize is 1.60 and Encode is 2.39
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |