logo separator

[mkgmap-dev] [PATCH?] Fix for german umlaut problem in style files

From Ulf Lamping ulf.lamping at googlemail.com on Fri Mar 27 10:58:23 GMT 2009

Hi!

As I tried to follow the guide at: 
http://wiki.openstreetmap.org/wiki/DE:All_in_one_Garmin_Map

I stumbled over the following mkgmap error:

Error in style: Error: (points:68): Invalid operation 'V' at top level

After communicating this on osm talk-de, I recognized that this problem 
only seem to appear on Windows but works fine on Linux.

The problematic style line:

cuisine = kebap | cuisine = döner [0x2a19 resolution 24]

contains a german umlaut ö (don't know if this char will be mangled by 
the mail transfer). The style file itself is an UTF-8 (without BOM) 
formatted file. I tried to convert the file to different character 
encodings, but always get the above error.


As far as i understand this, its a problem of the character encoding for 
style files. I've tried to tell mgkmap to use UTF8 from command line 
-Dfile.encoding=UTF8 only getting an "unrecognized option" error.


Then I digged deeper into the source code ...

The attached patch fixes the problem on my Windows XP german machine. It 
  tells JAVA to read the stylefile always in UTF-8 format, which is IMHO 
a good idea anyway ...

This is the first time I looked into the mkgmap code, so I don't know if 
this patch will make problems on Linux, if it fixes the problem in all 
style cases and very certainly has a very ugly Exception handling.


Couly someone have a look at it?

Regards, ULFL
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: styleutf8.diff
Url: http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090327/73d8c0f6/attachment.pl 


More information about the mkgmap-dev mailing list