Subject: | Google returns non-utf8 unless the user-agent says Mozilla |
Google, in their apparently infinite wisdom, return non-utf8 data unless
the user agent looks like Firefox or IE (or maybe others). The
user-agent string this module is using doesn't cut it.
A good example is this URI -
http://maps.google.com/maps/geo?q=B%C4%9Blohorsk%C3%A1+80%2C+6%2C+Czech+Republic&output=json&key=[your
key]
The canonical address _should_ come back as "Bělohorská 80, 169 00 Praha
6, Praha, Czech Republic" but without messing with the user agent, the e
with a caron (ě) comes back as a space!
Thanks, Google.
The fix is to just lie about the user-agent, like this:
Mozilla/5.0 (compatible; Geo::Coder::Google/0.03; Google, please stop
smoking crack)