On 24/07/13 02:26, Andrzej Popowski wrote:
Note: CP1252 is hard-coded in TDB, but probably it doesn't matter.
Perhaps, but lets fix it anyway... Patch attached.
..Steve
Index: src/uk/me/parabola/tdbfmt/HeaderBlock.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/tdbfmt/HeaderBlock.java (revision 2659)
+++ src/uk/me/parabola/tdbfmt/HeaderBlock.java (revision )
@@ -51,6 +51,8 @@
private byte enableProfile;
+ private int codePage;
+
HeaderBlock(int tdbVersion) {
this.tdbVersion = tdbVersion;
}
@@ -92,7 +94,7 @@
os.write4(0);
os.write4(0);
os.write3(0);
- os.write4(1252);
+ os.write4(codePage);
os.write4(10000);
os.write(1); // map is routable
if (enableProfile == 1)
@@ -156,6 +158,9 @@
this.familyId = familyId;
}
+ void setCodePage(int codePage) {
+ this.codePage = codePage;
+ }
public int getTdbVersion() {
return tdbVersion;
Index: src/uk/me/parabola/mkgmap/combiners/TdbBuilder.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/mkgmap/combiners/TdbBuilder.java (revision 2659)
+++ src/uk/me/parabola/mkgmap/combiners/TdbBuilder.java (revision )
@@ -27,7 +27,6 @@
import uk.me.parabola.imgfmt.app.map.MapReader;
import uk.me.parabola.log.Logger;
import uk.me.parabola.mkgmap.CommandArgs;
-import uk.me.parabola.mkgmap.general.LevelInfo;
import uk.me.parabola.tdbfmt.DetailMapBlock;
import uk.me.parabola.tdbfmt.TdbFile;
@@ -90,6 +89,7 @@
tdb = new TdbFile(tdbVersion);
tdb.setProductInfo(familyId, productId, productVersion, seriesName,
familyName, areaName, enableProfile);
+ tdb.setCodePage(args.getCodePage());
outputDir = args.getOutputDir();
}
Index: src/uk/me/parabola/tdbfmt/TdbFile.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/tdbfmt/TdbFile.java (revision 2659)
+++ src/uk/me/parabola/tdbfmt/TdbFile.java (revision )
@@ -104,6 +104,10 @@
this.overviewDescription = overviewDescription;
}
+ public void setCodePage(int codePage) {
+ headerBlock.setCodePage(codePage);
+ }
+
/**
* Add a copyright segment to the file.
* @param msg The message to add.
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev