Gangabass has asked for the wisdom of the Perl Monks concerning the following question:
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW::Mechanize and Wide character in subroutine entry error
by ikegami (Patriarch) on Jun 29, 2010 at 01:57 UTC | |
by Gangabass (Vicar) on Jun 29, 2010 at 02:55 UTC | |
by ikegami (Patriarch) on Jun 29, 2010 at 05:44 UTC | |
by Gangabass (Vicar) on Jun 29, 2010 at 05:58 UTC | |
|
Re: WWW::Mechanize and Wide character in subroutine entry error
by Wolfgang (Novice) on Jun 29, 2010 at 10:29 UTC |