[Tilesathome] FW: [OSM-talk] A large part of London Missing?

Dirk-Lüder Kreie osm-list at deelkar.net
Tue Dec 9 13:20:24 GMT 2008


Ed Loach schrieb:
>> Can anyone work out how to find out what possible UTF8 errors there
>> might be? Or would you be able to tell some other way if this were
>> the problem?
> 
> Someone replied as below. As I don't know Perl perhaps someone who does could consider whether to change Tileset.pm as suggested or not.
> 
> Ed
> --- Start quote ---
> You should try using decode("UTF-8") instead of decode("utf8") in your
> checking routine. UTF-8 and utf8 are not equivalent under Encode, the
> former is more strict, see
> http://perldoc.perl.org/Encode.html#UTF-8-vs.-utf8-vs.-UTF8
> 
>   encode("utf8",  "\x{FFFF_FFFF}", 1); # okay
>   encode("UTF-8", "\x{FFFF_FFFF}", 1); # croaks
> 
> It would also be useful to log these errors, they suggest invalid
> byte-sequences in the OSM dataset and it would be useful to fix them
> at their source.
> --- End quote ---

Thanks. Will fix.
IIRC the code returns the line number of the error.
(will check that).

-- 

Dirk-Lüder "Deelkar" Kreie
Bremen - 53.0952°N 8.8652°E

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/tilesathome/attachments/20081209/cff6cac5/attachment.pgp>


More information about the Tilesathome mailing list