Subject: | Yahoo/Search/XML.pm |
Date: | Sun, 30 Dec 2007 19:36:50 +0100 |
To: | bug-Yahoo-Search [...] rt.cpan.org |
From: | "Bernt Budde" <bernt.budde [...] gmail.com> |
Hello!
I am Bernt Budde from Uppsala, Sweden.
In Yahoo/Search/XML.pm, I had to change the _entity sub because of a
bug. (I was really using the Geo-Coder-Yahoo-0.03 distribution.)
This is probably just another aspect of the already reported utf-8
problem. But I use a borrowed portable over Xmas, so...
+ $VERSION = "20060729.004"
+ Perl version = 5.8.6
+ OS = Mac OS X, 10.4 PowerPC
# It used $val instead of $name, despite knowing it was undef
# from first test. :-)
# Tagged my changes with '/Bug' below.
sub _entity($)
{
my $name = shift;
if (my $val = $EntityDecode{$name}) {
return $val;
} elsif ($name =~ m/^#(\d+)$/) { # val->name /Bug
return chr($1);
} elsif ($name =~ m/^#x([0-9a-f]+)$/i) { # /Bug
return chr(hex($1)); # /Bug
} else {
_error(__LINE__, "unknown entity &$name;");
}
}