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:[email protected]] 
Sent: 18 January 2017 13:52
To: Development list for mkgmap <[email protected]>
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 <[email protected]> im Auftrag von Mike
Baggaley <[email protected]>
Gesendet: Samstag, 14. Januar 2017 23:21:22
An: [email protected]
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
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to