Skip Menu |

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

Report information
The Basics
Id: 34570
Status: resolved
Priority: 0/
Queue: Weather-Google

People
Owner: Nobody in particular
Requestors: tchatzi [...] arx.gr
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.01
Fixed in: (no value)



Subject: http://www.google.com/ig/api?weather= may return invalid UTF-8 on occasion
You could try e.g. http://www.google.com/ig/api?weather=Patras%2C%20Greece to see that XML::Simple rightfully chokes. My fix was to ``use Encode();'' and ``Encode::decode_utf8($xml, Encode::FB_DEFAULT);'' before it goes through XML::Simple. (Of course feel free to add eval()s as necessary to keep it working under pre 5.8.x perls).
From: POSSUM [...] cpan.org
On Mon Mar 31 08:10:17 2008, TCHATZI wrote: Show quoted text
> You could try e.g. > http://www.google.com/ig/api?weather=Patras%2C%20Greece to see that > XML::Simple rightfully chokes. > My fix was to ``use Encode();'' and ``Encode::decode_utf8($xml, > Encode::FB_DEFAULT);'' before it goes through XML::Simple. > (Of course feel free to add eval()s as necessary to keep it working > under pre 5.8.x perls).
This is fixed in version 0.02. I hope the solution is a correct one (the output will be, of course, different on systems with Encode() or not)