logo separator

[mkgmap-dev] Option --latin1 not working any more?

From Johann Gail johann.gail at gmx.de on Thu Mar 12 17:45:38 GMT 2009


> His patch:
>
>        } else if (name.equals("CodePage")) {
> -            if (!value.equals("1252"))
> -                dec = Charset.forName("cp" + value).newDecoder();
> +            dec = Charset.forName("cp" + value).newDecoder();
>
> Seems to only set the character set when there's a CodePage key in the
> file, osm2mp.pl does not output any when run with --nocodepage.
>
> I tried running osm2mp.pl --nocodepage and mkgmap --latin1 on an osm
> export recently and all the non-ascii characters were screwed up, it
> worked again with --codepage 1252 though.
>
>   

The important part of the patch not this part, but the line in the 
beginning of the file.  With this the default encoding gets changed to 
UTF8.

-    private static final String READING_CHARSET = "iso-8859-1";
+    private static final String READING_CHARSET = "UTF-8";


Only if there is an explicit codepage given in the mp file, then the 
encoding gets changed to another charset.

If it does not work for you, then please check the encoding of the mp 
file. There should be on each occurence of an umlaut two characters. 
Then it is UTF8. If this is not the case, then it has some other encoding.



More information about the mkgmap-dev mailing list