Skip Menu |

This queue is for tickets about the Net-Google CPAN distribution.

Report information
The Basics
Id: 1560
Status: resolved
Priority: 0/
Queue: Net-Google

People
Owner: Nobody in particular
Requestors: netgoogle [...] perlmeister.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.5
Fixed in: (no value)



Subject: Net::Google loops with umlauts
I found one bug with Net::Google -- and I don't know if it's Net::Google or the underlying SOAP::Lite or even Google itself, but it is easy to reproduce: use Net::Google; my $service = Net::Google->new( key => "YOUR_GOOGLE_KEY_HERE" ); my $session = $service->search(); $session->query('ß'); $session->results(); If you insert a valid Google key as YOUR_GOOGLE_KEY_HERE and make sure that the character passed to the query() method is indeed the umlaut 'ß' (%DF url-encoded), you'll see that the script above loops indefinitely, showing 500 Internal Server Error at /home/mschilli/PERL-5.6.0/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm line 2600 500 Internal Server Error at /home/mschilli/PERL-5.6.0/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm line 2600 ... Would be great if you could look into it -- thanks! -- Mike -------------------------------------------------------- Mike Schilli m@perlmeister.com http://perlmeister.com --------------------------------------------------------
This looks to be an encoding issue. The "ß" is probably (?) being encoded as Latin-1 (ISO-8859-1) that is causing the XML parser on the Google servers grief; specifically it can't find the closing </q> element and thinks the document is not well-formed. I can look into teaching the package to DWIM, but in the meantime I was able to "fix" the problem using the Text::Iconv package. $session->query(Text::Iconv->new("ISO-8859-1","UTF-8")->convert("ß")); Perl 5.8, I'm told, uses Encode.pm which is part of the core to do the same thing but I haven't played with it yet. [guest - Tue Sep 24 02:32:16 2002]: Show quoted text
> I found one bug with Net::Google -- and I don't know if it's > Net::Google or the underlying > SOAP::Lite or even Google itself, but it is easy to reproduce: > > use Net::Google; > my $service = Net::Google->new( > key => "YOUR_GOOGLE_KEY_HERE" > ); > my $session = $service->search(); > $session->query('ß'); > $session->results(); > > If you insert a valid Google key as YOUR_GOOGLE_KEY_HERE and > make sure that the character passed to > the query() method is indeed the umlaut 'ß' (%DF url-encoded), > you'll see that the script above > loops indefinitely, showing > > 500 Internal Server Error at > /home/mschilli/PERL-5.6.0/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm > line 2600 > 500 Internal Server Error at > /home/mschilli/PERL-5.6.0/lib/perl5/site_perl/5.6.0/SOAP/Lite.pm > line 2600 > ... > > Would be great if you could look into it -- thanks! > > -- Mike > -------------------------------------------------------- > Mike Schilli m@perlmeister.com http://perlmeister.com > -------------------------------------------------------- >