Index: src/uk/me/parabola/imgfmt/app/typ/TYPFile.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/typ/TYPFile.java	(revision 4398)
+++ src/uk/me/parabola/imgfmt/app/typ/TYPFile.java	(working copy)
@@ -121,12 +121,13 @@
 					// If we succeeded then note offsets for indexes
 					strToType.put(off, type);
 					typeToStr.put(type, off);
-
+					writer.put1u(0);
 				} catch (CharacterCodingException ignore) {
+					//ignore.printStackTrace();
 					String name = encoder.charset().name();
-					throw new TypLabelException(name);
+					log.warn("Cannot represent icon String", label, "in CodePage", name);
+					//throw new TypLabelException(name);
 				}
-				writer.put1u(0);
 			}
 		}
 		Utils.closeFile(writer);
Index: src/uk/me/parabola/imgfmt/app/typ/TypData.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/typ/TypData.java	(revision 4398)
+++ src/uk/me/parabola/imgfmt/app/typ/TypData.java	(working copy)
@@ -17,6 +17,7 @@
 import java.util.List;
 
 import uk.me.parabola.imgfmt.app.srt.Sort;
+import uk.me.parabola.log.Logger;
 
 /**
  * Holds all the data for a typ file.
@@ -24,6 +25,8 @@
  * @author Steve Ratcliffe
  */
 public class TypData {
+	private static final Logger log = Logger.getLogger(TypData.class);
+
 	private final ShapeStacking stacking = new ShapeStacking();
 	private final TypParam param = new TypParam();
 	private final List<TypPolygon> polygons = new ArrayList<TypPolygon>();
@@ -51,10 +54,11 @@
 			if (origCodepage != 0) {
 				if (origCodepage != sort.getCodepage()) {
 					// This is just a warning, not a definite problem
-					System.out.println("WARNING: SortCode in TYP txt file different from" +
-							" command line setting");
+					// and is to be expected if have general UTF-8 TYP.txt
+					log.warn("CodePage in TYP txt file:", sort.getCodepage(), "different from --code-page:", origCodepage);
 				}
 			}
+			return;  // want to use the command line one
 		}
 		this.sort = sort;
 		encoder = sort.getCharset().newEncoder();
Index: src/uk/me/parabola/imgfmt/app/typ/TypElement.java
===================================================================
--- src/uk/me/parabola/imgfmt/app/typ/TypElement.java	(revision 4398)
+++ src/uk/me/parabola/imgfmt/app/typ/TypElement.java	(working copy)
@@ -20,6 +20,7 @@
 import java.util.List;
 
 import uk.me.parabola.imgfmt.app.ImgFileWriter;
+import uk.me.parabola.log.Logger;
 
 /**
  * Base routines and data used by points, lines and polygons.
@@ -30,6 +31,8 @@
  * @author Steve Ratcliffe
  */
 public abstract class TypElement implements Comparable<TypElement> {
+	private static final Logger log = Logger.getLogger(TypElement.class);
+
 	private int type;
 	private int subType;
 
@@ -124,17 +127,19 @@
 	protected ByteBuffer makeLabelBlock(CharsetEncoder encoder) {
 		ByteBuffer out = ByteBuffer.allocate(256 * labels.size());
 		for (TypLabel tl : labels) {
-			out.put((byte) tl.getLang());
 			CharBuffer cb = CharBuffer.wrap(tl.getText());
 			try {
 				ByteBuffer buffer = encoder.encode(cb);
+				out.put((byte) tl.getLang());
 				out.put(buffer);
+				out.put((byte) 0);
 			} catch (CharacterCodingException ignore) {
+				//ignore.printStackTrace();
 				String name = encoder.charset().name();
 				//System.out.println("cs " + name);
-				throw new TypLabelException(name);
+				log.warn("Cannot represent String", tl.getText(), "for language", tl.getLang(), "in CodePage", name);
+				//throw new TypLabelException(name);
 			}
-			out.put((byte) 0);
 		}
 
 		return out;
Index: src/uk/me/parabola/mkgmap/main/TypCompiler.java
===================================================================
--- src/uk/me/parabola/mkgmap/main/TypCompiler.java	(revision 4398)
+++ src/uk/me/parabola/mkgmap/main/TypCompiler.java	(working copy)
@@ -85,7 +85,7 @@
 			param.setFamilyId(family);
 		if (product != -1)
 			param.setProductId(product);
-		if (cp != -1 && param.getCodePage() == 0)
+		if (cp != -1)
 			param.setCodePage(cp);
 
 		File outFile = new File(filename);
Index: src/uk/me/parabola/mkgmap/typ/IdSection.java
===================================================================
--- src/uk/me/parabola/mkgmap/typ/IdSection.java	(revision 4398)
+++ src/uk/me/parabola/mkgmap/typ/IdSection.java	(working copy)
@@ -42,7 +42,8 @@
 		} else if (name.equalsIgnoreCase("ProductCode")) {
 			data.setProductId(ival);
 		} else if (name.equalsIgnoreCase("CodePage")) {
-			data.setSort(SrtTextReader.sortForCodepage(ival));
+			if (data.getSort() == null) // ignore if --code-page
+				data.setSort(SrtTextReader.sortForCodepage(ival));
 		} else {
 			throw new SyntaxException(scanner, "Unrecognised keyword in id section: " + name);
 		}
