logo separator

[mkgmap-dev] style file reader patch

From Gerd Petermann GPetermann_muenchen at hotmail.com on Thu Jan 19 12:24:48 GMT 2017

Hi Mike,

I am also using Windows.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Mike Baggaley <mike at tvage.co.uk>
Gesendet: Donnerstag, 19. Januar 2017 13:20:16
An: 'Development list for mkgmap'
Betreff: Re: [mkgmap-dev] style file reader patch

Hi Gerd, This may be a platform specific problem. I am running on Windows.
Notepad and Visual Studio say my file is UTF-8 encoded, but it fails to load
with the accented character in it. It does load with the patch. Is there
anyone else using Windows who can try the line?

Regards,
Mike

-----Original Message-----
From: Gerd Petermann [mailto:GPetermann_muenchen at hotmail.com]
Sent: 18 January 2017 13:52
To: Development list for mkgmap <mkgmap-dev at lists.mkgmap.org.uk>
Subject: Re: [mkgmap-dev] style file reader patch

Hi Mike,

I am not able to reproduce the problem. I've added the line to the default
style points file
and mkgmap doesn't complain about it.
My editor (PSPad) "says" that the points file is a utf-8 encoded unix  file,
a hex editor shows no BOM.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Mike
Baggaley <mike at tvage.co.uk>
Gesendet: Samstag, 14. Januar 2017 23:21:22
An: mkgmap-dev at lists.mkgmap.org.uk
Betreff: [mkgmap-dev] style file reader patch

Hi Gerd, I have found that the style file reader does handle non ASCII
characters properly. With the following line in my points file:

amenity=cafe & name~'[Cc]af[eé]' {echotags 'Description as name'; delete
name}

I get an error:

Error in style : error : (points:142): Bad character in input, file probably
not in utf-8

This happens whether or not I save the points file as UTF-8.

The attached patch fixes the problem.

Can you please try it and commit if it is OK (you may want to change the
RuntimeException)?

Thanks,
Mike



_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list