logo separator

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

From Johann Gail johann.gail at gmx.de on Tue Feb 10 19:38:39 GMT 2009

osm2mp writes no codapage label into the file if called with the 
--nocodepage. Instead it writes the comment
';UTF-8 encoded.'

So I assume, if no codepage is declared, UTF-8 is the default.

With the following patch mkgmap assumes this also. For me it works now 
perfectly, if I call osm2mp with the option --nocodepage.


Index: src/uk/me/parabola/mkgmap/reader/polish/PolishMapDataSource.java
===================================================================
--- src/uk/me/parabola/mkgmap/reader/polish/PolishMapDataSource.java    
(Revision 869)
+++ src/uk/me/parabola/mkgmap/reader/polish/PolishMapDataSource.java    
(Arbeitskopie)
@@ -58,7 +58,7 @@
 public class PolishMapDataSource extends MapperBasedMapDataSource 
implements LoadableMapDataSource {
     private static final Logger log = 
Logger.getLogger(PolishMapDataSource.class);
 
-    private static final String READING_CHARSET = "iso-8859-1";
+    private static final String READING_CHARSET = "UTF-8";
 
     private static final int S_IMG_ID = 1;
     private static final int S_POINT = 2;
@@ -470,8 +470,7 @@
             if (fc == 'm' || fc == 'M')
                 elevUnits = 'm';
         } else if (name.equals("CodePage")) {
-            if (!value.equals("1252"))
-                dec = Charset.forName("cp" + value).newDecoder();
+            dec = Charset.forName("cp" + value).newDecoder();
         }
     }
 




More information about the mkgmap-dev mailing list