panic: utf16_to_utf8: odd bytelen 3
che tipo di errore è ?
panic: utf16_to_utf8: odd bytelen 3
che tipo di errore è ?
in che contesto viene generato?
Marco Allegretti
shishii@tiscalinet.it
Lang: PERL, PHP, SQL.
Linux user n° 268623 Fedora Core 10, Fedora Core 6, Debian Sarge on mips
facendo:
$request = HTTP::Request->new(GET => '$url');
$ua = LWP::UserAgent->new;
$response = $ua->request($request);
if ($response->is_success) {
print $response->content;
}
prova ad inserire all'inizio dello script, dopo l'indirizzo dell'interprete:
use utf8;
Marco Allegretti
shishii@tiscalinet.it
Lang: PERL, PHP, SQL.
Linux user n° 268623 Fedora Core 10, Fedora Core 6, Debian Sarge on mips
già fatto![]()
io ho trovato questo:
panic: utf16_to_utf8: odd bytelen
(P) Something tried to call utf16_to_utf8 with an odd (as opposed to even) byte length.
ma è poco utile mi sa![]()
si tratta di una funzione interna in C dell'interprete che va in crisi quando cerca di convertire un carattere utf16 in utf8 e gli viene passato un carattere avente un numero di byte dispari e diverso da 1.
Probabilmente nella pagina processata ci sono caratteri anomali.
Marco Allegretti
shishii@tiscalinet.it
Lang: PERL, PHP, SQL.
Linux user n° 268623 Fedora Core 10, Fedora Core 6, Debian Sarge on mips
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
use HTTP::Request;
use HTTP::Response;
my $ua = new LWP::UserAgent;
my $request = new HTTP::Request('GET', 'http://www.google.it/');
my $response = $ua->request($request);
if ($response->is_success) {
print $response->content;
} else {
print $response->error_as_HTML;
}
cosi va, bhoooooooo !![]()