Subject: | Encode::is_utf8 check possibly wrong |
The geocode method has the following lines:
if( Encode::is_utf8($location) ) {
$location = Encode::encode_utf8($location);
};
Checking here for the utf8 flag (Encode::is_utf8(...)) is wrong — you
want to get utf8 octets here even if the string is coded in latin1,
without a utf8 flag. So the if condition may be safely removed. (This of
course means that the users have to declare their data correctly if
using utf8, i.e. source code must have the "use utf8" pragma, and data
from files should have been processed through the utf8 encoding layer)
Regards,
Slaven