Index: src/uk/me/parabola/imgfmt/app/map/Map.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/imgfmt/app/map/Map.java	(revision 3704)
+++ src/uk/me/parabola/imgfmt/app/map/Map.java	(revision )
@@ -23,6 +23,7 @@
 import uk.me.parabola.imgfmt.app.Area;
 import uk.me.parabola.imgfmt.app.ImgFile;
 import uk.me.parabola.imgfmt.app.Label;
+import uk.me.parabola.imgfmt.app.labelenc.EncodedText;
 import uk.me.parabola.imgfmt.app.lbl.LBLFile;
 import uk.me.parabola.imgfmt.app.net.NETFile;
 import uk.me.parabola.imgfmt.app.net.NODFile;
@@ -164,7 +165,8 @@
 	 * @param info Any string.
 	 */
 	public void addInfo(String info) {
-		treFile.addInfo(info);
+		EncodedText enc = lblFile.getEncodedText(info);
+		treFile.addInfo(enc);
 	}
 
 	/**
Index: src/uk/me/parabola/mkgmap/build/MapBuilder.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/mkgmap/build/MapBuilder.java	(revision 3704)
+++ src/uk/me/parabola/mkgmap/build/MapBuilder.java	(revision )
@@ -15,9 +15,10 @@
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileNotFoundException;
-import java.io.FileReader;
 import java.io.IOException;
+import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -27,8 +28,6 @@
 import java.util.List;
 import java.util.Set;
 
-import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
-
 import uk.me.parabola.imgfmt.ExitException;
 import uk.me.parabola.imgfmt.Utils;
 import uk.me.parabola.imgfmt.app.Coord;
@@ -95,6 +94,8 @@
 import uk.me.parabola.util.Configurable;
 import uk.me.parabola.util.EnhancedProperties;
 
+import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
+
 /**
  * This is the core of the code to translate from the general representation
  * into the garmin representation.
@@ -821,16 +822,12 @@
 
 	/**
 	 * Set all the information that appears in the header.
-	 *
-	 * @param map The map to write to.
-	 * @param src The source of map information.
 	 */
 	protected void getMapInfo() {
 		if (licenseFileName != null) {
-			File file = new File(licenseFileName);
-
 			try {
-				BufferedReader reader = new BufferedReader(new FileReader(file));
+				FileInputStream is = new FileInputStream(licenseFileName);
+				BufferedReader reader = new BufferedReader(new InputStreamReader(is, "utf-8"));
 				String text;
 
 				// repeat until all lines is read
Index: src/uk/me/parabola/mkgmap/reader/osm/OsmMapDataSource.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/mkgmap/reader/osm/OsmMapDataSource.java	(revision 3704)
+++ src/uk/me/parabola/mkgmap/reader/osm/OsmMapDataSource.java	(revision )
@@ -17,11 +17,12 @@
 package uk.me.parabola.mkgmap.reader.osm;
 
 import java.io.BufferedReader;
-import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileNotFoundException;
 import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
+import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -141,10 +142,10 @@
 		String copyrightFileName = getConfig().getProperty("copyright-file", null);
 		if (copyrightFileName != null)
 		{
-			File file = new File(copyrightFileName);
 			List<String> copyrightArray = new ArrayList<String>();
 			try {
-				BufferedReader reader = new BufferedReader(new FileReader(file));
+				InputStream is = new FileInputStream(copyrightFileName);
+				BufferedReader reader = new BufferedReader(new InputStreamReader(is, "utf-8"));
 				String text;
 				while ((text = reader.readLine()) != null) {
 					copyrightArray.add(text);
Index: src/uk/me/parabola/imgfmt/app/lbl/LBLFile.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/imgfmt/app/lbl/LBLFile.java	(revision 3704)
+++ src/uk/me/parabola/imgfmt/app/lbl/LBLFile.java	(revision )
@@ -16,6 +16,7 @@
  */
 package uk.me.parabola.imgfmt.app.lbl;
 
+import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Map;
 
@@ -129,7 +130,7 @@
 	 * @return A reference to the created label.
 	 */
 	public Label newLabel(String text) {
-		EncodedText encodedText = textEncoder.encodeText(text);
+		EncodedText encodedText = getEncodedText(text);
 
 		Label l = labelCache.get(encodedText);
 		if (l == null) {
@@ -148,6 +149,10 @@
 		return l;
 	}
 
+	public EncodedText getEncodedText(String text) {
+		return textEncoder.encodeText(text);
+	}
+
 	/**
 	 * Align for the next label.
 	 *
Index: src/uk/me/parabola/imgfmt/app/trergn/TREFile.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/uk/me/parabola/imgfmt/app/trergn/TREFile.java	(revision 3704)
+++ src/uk/me/parabola/imgfmt/app/trergn/TREFile.java	(revision )
@@ -27,6 +27,7 @@
 import uk.me.parabola.imgfmt.app.ImgFile;
 import uk.me.parabola.imgfmt.app.ImgFileWriter;
 import uk.me.parabola.imgfmt.app.Label;
+import uk.me.parabola.imgfmt.app.labelenc.EncodedText;
 import uk.me.parabola.imgfmt.fs.ImgChannel;
 import uk.me.parabola.log.Logger;
 import uk.me.parabola.util.Configurable;
@@ -82,15 +83,14 @@
 	 * Add a string to the 'mapinfo' section.  This is a section between the
 	 * header and the start of the data.  Nothing points to it directly.
 	 *
-	 * @param msg A string, usually used to describe the program that generated
-	 * the file.
+	 * @param enc A string in the EncodedText format.
 	 */
-	public void addInfo(String msg) {
-		byte[] val = Utils.toBytes(msg);
+	public void addInfo(EncodedText enc) {
+		byte[] val = enc.getCtext();
 		if (position() != header.getHeaderLength() + header.getMapInfoSize())
 			throw new IllegalStateException("All info must be added before anything else");
 
-		header.setMapInfoSize(header.getMapInfoSize() + (val.length+1));
+		header.setMapInfoSize(header.getMapInfoSize() + enc.getLength() + 1);
 		getWriter().put(val);
 		getWriter().put((byte) 0);
 	}
