Subject: | Encoding problems |
The attached script shows the following output on my system (FreeBSD 8.0
with either perl 5.8.8 or perl 5.12.0):
$ perl5.12.0 /tmp/bing.t
not ok 1
# Failed test at /tmp/bing.t line 9.
# got: 'Schmöckwitz'
# expected: 'Schmöckwitz'
SV = PV(0x287c8588) at 0x2889e680
REFCNT = 1
FLAGS = (POK,pPOK,UTF8)
PV = 0x2897f800 "Schm\303\203\302\266ckwitz"\0 [UTF8
"Schm\x{c3}\x{b6}ckwitz"]
CUR = 14
LEN = 16
1..1
# Looks like you failed 1 test of 1.
So it looks like the result is somehow double-encoded utf8.
Regards,
Slaven
Subject: | bing.t |
#!/usr/bin/perl -w
use Test::More 'no_plan';
use Geo::Coder::Bing;
use Devel::Peek;
{
my $location = Geo::Coder::Bing->new->geocode('Anglerweg, Schmöckwitz');
is($location->{Address}->{Locality}, 'Schmöckwitz')
or Dump $location->{Address}->{Locality};
}
__END__