changeset 5:cbdff98c45ea tn5250

adding tn5250 files
author Carl Byington <carl@five-ten-sg.com>
date Thu, 22 May 2014 12:38:09 -0700
parents 1f5d9b76a183
children 1b9e27659ef7
files src/org/tn5250j/encoding/AbstractCodePage.java src/org/tn5250j/encoding/BuiltInCodePageFactory.java src/org/tn5250j/encoding/CharMappings.java src/org/tn5250j/encoding/ICodePage.java src/org/tn5250j/encoding/JavaCodePageFactory.java src/org/tn5250j/encoding/ToolboxCodePageFactory.java src/org/tn5250j/encoding/builtin/CCSID1025.java src/org/tn5250j/encoding/builtin/CCSID1026.java src/org/tn5250j/encoding/builtin/CCSID1112.java src/org/tn5250j/encoding/builtin/CCSID1140.java src/org/tn5250j/encoding/builtin/CCSID1141.java src/org/tn5250j/encoding/builtin/CCSID1147.java src/org/tn5250j/encoding/builtin/CCSID1148.java src/org/tn5250j/encoding/builtin/CCSID273.java src/org/tn5250j/encoding/builtin/CCSID277.java src/org/tn5250j/encoding/builtin/CCSID278.java src/org/tn5250j/encoding/builtin/CCSID280.java src/org/tn5250j/encoding/builtin/CCSID284.java src/org/tn5250j/encoding/builtin/CCSID285.java src/org/tn5250j/encoding/builtin/CCSID297.java src/org/tn5250j/encoding/builtin/CCSID37.java src/org/tn5250j/encoding/builtin/CCSID424.java src/org/tn5250j/encoding/builtin/CCSID500.java src/org/tn5250j/encoding/builtin/CCSID870.java src/org/tn5250j/encoding/builtin/CCSID871.java src/org/tn5250j/encoding/builtin/CCSID875.java src/org/tn5250j/encoding/builtin/CodepageConverterAdapter.java src/org/tn5250j/encoding/builtin/ICodepageConverter.java src/org/tn5250j/event/ScreenListener.java src/org/tn5250j/tools/logging/ConsoleLogger.java src/org/tn5250j/tools/logging/Log4jLogger.java src/org/tn5250j/tools/logging/TN5250jLogFactory.java src/org/tn5250j/tools/logging/TN5250jLogger.java
diffstat 33 files changed, 3177 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/AbstractCodePage.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,45 @@
+/**
+ * Title: CodePage.java
+ * Copyright:   Copyright (c) 2001, 2002, 2003
+ * Company:
+ * @author  Kenneth J. Pouncey
+ *          rewritten by LDC, WVL, Luc
+ * @version 0.4
+ *
+ * Description:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding;
+
+/**
+ *
+ * This class controls the translation from EBCDIC to ASCII and ASCII to EBCDIC
+ *
+ */
+public abstract class AbstractCodePage implements ICodePage {
+
+	protected AbstractCodePage(String encoding) {
+		this.encoding = encoding;
+	}
+
+	public String getEncoding() {
+		return encoding;
+	}
+
+	protected String encoding;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/BuiltInCodePageFactory.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,149 @@
+/**
+ * $Id$
+ *
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2012
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding;
+
+import java.lang.reflect.Constructor;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+import org.tn5250j.encoding.builtin.CCSID1025;
+import org.tn5250j.encoding.builtin.CCSID1026;
+import org.tn5250j.encoding.builtin.CCSID1112;
+import org.tn5250j.encoding.builtin.CCSID1140;
+import org.tn5250j.encoding.builtin.CCSID1141;
+import org.tn5250j.encoding.builtin.CCSID1147;
+import org.tn5250j.encoding.builtin.CCSID1148;
+import org.tn5250j.encoding.builtin.CCSID273;
+import org.tn5250j.encoding.builtin.CCSID277;
+import org.tn5250j.encoding.builtin.CCSID278;
+import org.tn5250j.encoding.builtin.CCSID280;
+import org.tn5250j.encoding.builtin.CCSID284;
+import org.tn5250j.encoding.builtin.CCSID285;
+import org.tn5250j.encoding.builtin.CCSID297;
+import org.tn5250j.encoding.builtin.CCSID37;
+import org.tn5250j.encoding.builtin.CCSID424;
+import org.tn5250j.encoding.builtin.CCSID500;
+import org.tn5250j.encoding.builtin.CCSID870;
+import org.tn5250j.encoding.builtin.CCSID871;
+import org.tn5250j.encoding.builtin.CCSID875;
+import org.tn5250j.encoding.builtin.ICodepageConverter;
+import org.tn5250j.tools.logging.TN5250jLogFactory;
+import org.tn5250j.tools.logging.TN5250jLogger;
+
+/**
+ * Methods for built-in code page support.
+ */
+/* package */ class BuiltInCodePageFactory {
+
+	private static BuiltInCodePageFactory singleton;
+
+	private final List<Class<?>> clazzes = new ArrayList<Class<?>>();
+	private final TN5250jLogger log = TN5250jLogFactory.getLogger(this.getClass());
+
+	private BuiltInCodePageFactory() {
+		register();
+	}
+
+	public static synchronized final BuiltInCodePageFactory getInstance() {
+		if (singleton == null) {
+			singleton = new BuiltInCodePageFactory();
+		}
+		return singleton;
+	}
+
+	private void register() {
+		clazzes.add(CCSID37.class);
+		clazzes.add(CCSID273.class);
+		clazzes.add(CCSID277.class);
+		clazzes.add(CCSID278.class);
+		clazzes.add(CCSID280.class);
+		clazzes.add(CCSID284.class);
+		clazzes.add(CCSID285.class);
+		clazzes.add(CCSID297.class);
+		clazzes.add(CCSID424.class);
+		clazzes.add(CCSID500.class);
+		clazzes.add(CCSID870.class);
+		clazzes.add(CCSID871.class);
+		clazzes.add(CCSID875.class);
+		clazzes.add(CCSID1025.class);
+		clazzes.add(CCSID1026.class);
+		clazzes.add(CCSID1112.class);
+		clazzes.add(CCSID1140.class);
+		clazzes.add(CCSID1141.class);
+		clazzes.add(CCSID1147.class);
+		clazzes.add(CCSID1148.class);
+	}
+
+	/**
+	 * @return unsorted list of available code pages
+	 */
+	public String[] getAvailableCodePages() {
+		HashSet<String> cpset = new HashSet<String>();
+		for (Class<?> clazz : clazzes) {
+			final ICodepageConverter converter = getConverterFromClassName(clazz);
+			if (converter != null) {
+				cpset.add(converter.getName());
+			}
+		}
+		return cpset.toArray(new String[cpset.size()]);
+	}
+
+	/**
+	 * @param encoding
+	 * @return an {@link ICodePage} object OR null, of not found
+	 */
+	public ICodePage getCodePage(String encoding) {
+		for (Class<?> clazz : clazzes) {
+			final ICodepageConverter converter = getConverterFromClassName(clazz);
+			if (converter != null && converter.getName().equals(encoding)) {
+				return converter;
+			}
+		}
+		return null;
+	}
+
+	/**
+	 * Lazy loading converters takes time,
+	 * but doesn't happen so often and saves memory.
+	 *
+	 * @param clazz {@link ICodepageConverter}
+	 * @return
+	 */
+	private ICodepageConverter getConverterFromClassName(Class<?> clazz) {
+		try {
+			final Constructor<?> constructor = clazz.getConstructor(new Class[0]);
+			final ICodepageConverter converter = (ICodepageConverter) constructor.newInstance();
+			converter.init();
+			return converter;
+		} catch (Exception e) {
+			log.error("Couldn't load code page converter class:" + clazz.getCanonicalName(), e);
+			return null;
+		}
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/CharMappings.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,85 @@
+/**
+ * Title: CharMappings.java
+ * Copyright:   Copyright (c) 2001,2002,2003
+ * Company:
+ * @author  Kenneth J. Pouncey
+ *          rewritten by LDC, WVL, Luc
+ * @version 0.4
+ *
+ * Description:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding;
+
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Character Mappings for EBCDIC to ASCII and ASCII to EBCDIC translations
+ */
+public class CharMappings {
+
+	public static final String DFT_ENC = "37";
+	public static final int NATIVE_CP = 0;
+	public static final int TOOLBOX_CP = 1;
+
+	private static final HashMap<String,ICodePage> map = new HashMap<String, ICodePage>();
+
+	public static String[] getAvailableCodePages() {
+		Set<String> cpset = new HashSet<String>(); // no double entries
+		for (String cp : BuiltInCodePageFactory.getInstance().getAvailableCodePages()) {
+			cpset.add(cp);
+		}
+		for (String cp : ToolboxCodePageFactory.getInstance().getAvailableCodePages()) {
+			cpset.add(cp);
+		}
+		String[] cparray = cpset.toArray(new String[cpset.size()]);
+		Arrays.sort(cparray);
+		return cparray;
+	}
+
+	public static ICodePage getCodePage(String encoding) {
+		if (map.containsKey(encoding)) {
+			return map.get(encoding);
+		}
+
+		ICodePage cp = BuiltInCodePageFactory.getInstance().getCodePage(encoding);
+		if (cp != null) {
+			map.put(encoding, cp);
+			return cp;
+		}
+
+		cp = ToolboxCodePageFactory.getInstance().getCodePage(encoding);
+		if (cp != null) {
+			map.put(encoding, cp);
+			return cp;
+		}
+
+		cp = JavaCodePageFactory.getCodePage(encoding);
+		if (cp != null) {
+			map.put(encoding, cp);
+			return cp;
+		}
+
+		// unsupported codepage ==> return default
+		return BuiltInCodePageFactory.getInstance().getCodePage(DFT_ENC);
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/ICodePage.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,22 @@
+package org.tn5250j.encoding;
+
+public interface ICodePage {
+
+	/**
+	 * Convert a single byte (or maybe more bytes which representing one character) to a Unicode character.
+	 *
+	 * @param index
+	 * @return
+	 */
+	public abstract char ebcdic2uni(int index);
+
+	/**
+	 * Convert a Unicode character in it's byte representation.
+	 * Therefore, only 8bit codepages are supported.
+	 *
+	 * @param index
+	 * @return
+	 */
+	public abstract byte uni2ebcdic(char index);
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/JavaCodePageFactory.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,94 @@
+/**
+ * Title: JavaCodePage
+ * Copyright:   Copyright (c) 2001, 2002, 2003
+ * Company:
+ * @author  LDC, WVL, Luc, master_jaf
+ * @version 0.4
+ *
+ * Description:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding;
+
+import java.nio.ByteBuffer;
+import java.nio.CharBuffer;
+import java.nio.charset.Charset;
+import java.nio.charset.CharsetDecoder;
+import java.nio.charset.CharsetEncoder;
+
+/* package */ class JavaCodePageFactory extends AbstractCodePage {
+
+	private final CharsetEncoder encoder;
+	private final CharsetDecoder decoder;
+
+	/* package */ JavaCodePageFactory(String encoding, CharsetEncoder encoder, CharsetDecoder decoder) {
+		super(encoding);
+		this.encoder = encoder;
+		this.decoder = decoder;
+	}
+
+	/* (non-Javadoc)
+	 * @see org.tn5250j.encoding.CodePage#ebcdic2uni(int)
+	 */
+	@Override
+	public char ebcdic2uni(int codepoint) {
+		try {
+			final ByteBuffer in = ByteBuffer.wrap(new byte[] { (byte) codepoint });
+			final CharBuffer out = this.decoder.decode(in);
+			return out.get(0);
+		} catch (Exception cce) {
+			return ' ';
+		}
+	}
+
+	/* (non-Javadoc)
+	 * @see org.tn5250j.encoding.CodePage#uni2ebcdic(char)
+	 */
+	@Override
+	public byte uni2ebcdic(char character) {
+		try {
+			final CharBuffer in = CharBuffer.wrap(new char[] {character});
+			final ByteBuffer out = this.encoder.encode(in);
+			return out.get(0);
+		} catch (Exception cce) {
+			return 0x0;
+		}
+	}
+
+	/**
+	 * @param encoding
+	 * @return A new {@link CodePage} object OR null, if not available.
+	 */
+	/* package */ static ICodePage getCodePage(final String encoding) {
+		CharsetDecoder dec = null;
+		CharsetEncoder enc = null;
+		try {
+			final Charset cs = java.nio.charset.Charset.forName(encoding);
+			dec = cs.newDecoder();
+			enc = cs.newEncoder();
+		} catch (Exception e) {
+			enc = null;
+			dec = null;
+		}
+		if ((enc != null) && (dec != null)) {
+			return new JavaCodePageFactory(encoding, enc, dec);
+		}
+		return null;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/ToolboxCodePageFactory.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,156 @@
+/**
+ * Title: ToolboxCodePage
+ * Copyright:   Copyright (c) 2001, 2002, 2003
+ * Company:
+ * @author  Kenneth J. Pouncey
+ *          rewritten by LDC, WVL, Luc
+ * @version 0.4
+ *
+ * Description:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding;
+
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+
+import org.tn5250j.tools.logging.TN5250jLogFactory;
+import org.tn5250j.tools.logging.TN5250jLogger;
+
+/* package */ class ToolboxCodePageFactory {
+
+	private final static String[] CODEPAGES = { "Big5", "Cp037", "Cp273", "Cp277", "Cp278",
+			"Cp280", "Cp284", "Cp285", "Cp297", "Cp420", "Cp424", "Cp437",
+			"Cp500", "Cp737", "Cp775", "Cp838", "Cp850", "Cp852", "Cp855",
+			"Cp856", "Cp857", "Cp858", "Cp860", "Cp861", "Cp862", "Cp863",
+			"Cp864", "Cp865", "Cp866", "Cp868", "Cp869", "Cp870",
+			"Cp871", "Cp874", "Cp875", "Cp918", "Cp921", "Cp922",
+			"Cp923", // IBM Latin-9.
+			"Cp930", "Cp933", "Cp935", "Cp937", "Cp939", "Cp942", "Cp943",
+			"Cp948", "Cp949", "Cp950", "Cp964", "Cp970", "Cp1006", "Cp1025",
+			"Cp1026", "Cp1046", "Cp1097", "Cp1098", "Cp1112", "Cp1122",
+			"Cp1123", "Cp1124", "Cp1140", "Cp1141", "Cp1142", "Cp1143",
+			"Cp1144", "Cp1145", "Cp1146", "Cp1147", "Cp1148", "Cp1149",
+			"Cp1252", "Cp1250", "Cp1251", "Cp1253", "Cp1254", "Cp1255",
+			"Cp1256", "Cp1257", "Cp1258", "Cp1381", "Cp1383", "Cp33722" };
+
+	private static final String CONVERTER_NAME = "com.ibm.as400.access.CharConverter";
+	private static final String TOBYTES_NAME = "stringToByteArray";
+	private static final String TOSTRING_NAME = "byteArrayToString";
+
+	private static ToolboxCodePageFactory singleton;
+
+	private final TN5250jLogger log = TN5250jLogFactory.getLogger(this.getClass());
+
+	private ToolboxCodePageFactory() {
+		/* private for singleton */
+	}
+
+	public static synchronized ToolboxCodePageFactory getInstance() {
+		if (singleton == null) {
+			singleton = new ToolboxCodePageFactory();
+		}
+		return singleton;
+	}
+
+	/**
+	 * @return
+	 */
+	public String[] getAvailableCodePages() {
+		try {
+			final ClassLoader loader = getClassLoader();
+			Class.forName(CONVERTER_NAME, false, loader);
+			return CODEPAGES;
+		} catch (Exception e) {
+			log.info("Couldn't locate JT400 Toolbox in classpath. Charset converters can't be used.");
+			return new String[0];
+		}
+	}
+
+	/**
+	 * @param encoding
+	 * @return
+	 */
+	public ICodePage getCodePage(String encoding) {
+		try {
+			ClassLoader loader = getClassLoader();
+			Class<?> conv_class = Class.forName(CONVERTER_NAME, true, loader);
+			Constructor<?> conv_constructor = conv_class.getConstructor(new Class[] { String.class });
+			Method toBytes_method = conv_class.getMethod(TOBYTES_NAME, new Class[] { String.class });
+			Method toString_method = conv_class.getMethod(TOSTRING_NAME, new Class[] { byte[].class });
+			Object convobj = conv_constructor.newInstance(new Object[] { encoding });
+			return new ToolboxConverterProxy(convobj, toBytes_method, toString_method);
+		} catch (Exception e) {
+			log.warn("Can't load charset converter from JT400 Toolbox for code page " + encoding, e);
+			return null;
+		}
+	}
+
+	private static final ClassLoader getClassLoader() {
+		ClassLoader loader = ToolboxCodePageFactory.class.getClassLoader();
+		if (loader == null) {
+			loader = ClassLoader.getSystemClassLoader();
+		}
+		return loader;
+	}
+
+	private static class ToolboxConverterProxy implements ICodePage {
+
+		private final Object converter;
+		private final Method tobytesMethod;
+		private final Method tostringMethod;
+
+		private ToolboxConverterProxy(Object converterObject, Method tobytesMethod, Method tostringMethod) {
+			super();
+			this.converter = converterObject;
+			this.tobytesMethod = tobytesMethod;
+			this.tostringMethod = tostringMethod;
+		}
+
+		@Override
+		public char ebcdic2uni(int index) {
+			Object result;
+			try {
+				result = tostringMethod.invoke(converter, new Object[] { new byte[] { (byte) (index & 0xFF) } });
+			} catch (Throwable t) {
+				result = null;
+			}
+
+			if (result == null)
+				return 0x00;
+
+			return ((String) result).charAt(0);
+		}
+
+		@Override
+		public byte uni2ebcdic(char index) {
+			Object result;
+			try {
+				result = tobytesMethod.invoke(converter, new Object[] { new String(new char[] { index }) });
+			} catch (Throwable t) {
+				result = null;
+			}
+
+			if (result == null)
+				return 0x00;
+
+			return ((byte[]) result)[0];
+		}
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID1025.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 1025<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid1025.jsp
+ */
+public final class CCSID1025 extends CodepageConverterAdapter {
+
+	public final static String NAME = "1025";
+	public final static String DESCR = "Cyrillic Multilingual";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u0452',
+			'\u0453', '\u0451', '\u0454', '\u0455', '\u0456', '\u0457',
+			'\u0458', '[', '.', '<', '(', '+', '!', '&', '\u0459', '\u045A',
+			'\u045B', '\u045C', '\u045E', '\u045F', '\u042A', '\u2116',
+			'\u0402', ']', '$', '*', ')', ';', '^', '-', '/', '\u0403',
+			'\u0401', '\u0404', '\u0405', '\u0406', '\u0407', '\u0408',
+			'\u0409', '|', ',', '%', '_', '>', '?', '\u040A', '\u040B',
+			'\u040C', '\u00AD', '\u040E', '\u040F', '\u044E', '\u0430',
+			'\u0431', '`', ':', '#', '@', '\'', '=', '"', '\u0446', 'a', 'b',
+			'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u0434', '\u0435', '\u0444',
+			'\u0433', '\u0445', '\u0438', '\u0439', 'j', 'k', 'l', 'm', 'n',
+			'o', 'p', 'q', 'r', '\u043A', '\u043B', '\u043C', '\u043D',
+			'\u043E', '\u043F', '\u044F', '~', 's', 't', 'u', 'v', 'w', 'x',
+			'y', 'z', '\u0440', '\u0441', '\u0442', '\u0443', '\u0436',
+			'\u0432', '\u044C', '\u044B', '\u0437', '\u0448', '\u044D',
+			'\u0449', '\u0447', '\u044A', '\u042E', '\u0410', '\u0411',
+			'\u0426', '\u0414', '\u0415', '\u0424', '\u0413', '{', 'A', 'B',
+			'C', 'D', 'E', 'F', 'G', 'H', 'I', '\u0425', '\u0418', '\u0419',
+			'\u041A', '\u041B', '\u041C', '}', 'J', 'K', 'L', 'M', 'N', 'O',
+			'P', 'Q', 'R', '\u041D', '\u041E', '\u041F', '\u042F', '\u0420',
+			'\u0421', '\\', '\u00A7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+			'\u0422', '\u0423', '\u0416', '\u0412', '\u042C', '\u042B', '0',
+			'1', '2', '3', '4', '5', '6', '7', '8', '9', '\u0417', '\u0428',
+			'\u042D', '\u0429', '\u0427', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID1026.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 1026<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid1026.jsp
+ */
+public final class CCSID1026 extends CodepageConverterAdapter {
+
+	public final static String NAME = "1026";
+	public final static String DESCR = "Turkey Latin 5";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '\u00E0', '\u00E1', '\u00E3', '\u00E5', '{', '\u00F1',
+			'\u00C7', '.', '<', '(', '+', '!', '&', '\u00E9', '\u00EA',
+			'\u00EB', '\u00E8', '\u00ED', '\u00EE', '\u00EF', '\u00EC',
+			'\u00DF', '\u011E', '\u0130', '*', ')', ';', '^', '-', '/',
+			'\u00C2', '\u00C4', '\u00C0', '\u00C1', '\u00C3', '\u00C5', '[',
+			'\u00D1', '\u015F', ',', '%', '_', '>', '?', '\u00F8', '\u00C9',
+			'\u00CA', '\u00CB', '\u00C8', '\u00CD', '\u00CE', '\u00CF',
+			'\u00CC', '\u0131', ':', '\u00D6', '\u015E', '\'', '=', '\u00DC',
+			'\u00D8', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u00AB',
+			'\u00BB', '}', '`', '\u00A6', '\u00B1', '\u00B0', 'j', 'k', 'l',
+			'm', 'n', 'o', 'p', 'q', 'r', '\u00AA', '\u00BA', '\u00E6',
+			'\u00B8', '\u00C6', '\u00A4', '\u00B5', '\u00F6', 's', 't', 'u',
+			'v', 'w', 'x', 'y', 'z', '\u00A1', '\u00BF', ']', '$', '@',
+			'\u00AE', '\u00A2', '\u00A3', '\u00A5', '\u00B7', '\u00A9',
+			'\u00A7', '\u00B6', '\u00BC', '\u00BD', '\u00BE', '\u00AC', '|',
+			'\u00AF', '\u00A8', '\u00B4', '\u00D7', '\u00E7', 'A', 'B', 'C',
+			'D', 'E', 'F', 'G', 'H', 'I', '\u00AD', '\u00F4', '~', '\u00F2',
+			'\u00F3', '\u00F5', '\u011F', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
+			'Q', 'R', '\u00B9', '\u00FB', '\\', '\u00F9', '\u00FA', '\u00FF',
+			'\u00FC', '\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+			'\u00B2', '\u00D4', '#', '\u00D2', '\u00D3', '\u00D5', '0', '1',
+			'2', '3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB', '"',
+			'\u00D9', '\u00DA', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID1112.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 1112<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid1112.jsp
+ */
+public final class CCSID1112 extends CodepageConverterAdapter {
+
+	public final static String NAME = "1112";
+	public final static String DESCR = "Baltic, Multilingual";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u0161',
+			'\u00E4', '\u0105', '\u012F', '\u016B', '\u00E5', '\u0113',
+			'\u017E', '\u00A2', '.', '<', '(', '+', '|', '&', '\u00E9',
+			'\u0119', '\u0117', '\u010D', '\u0173', '\u201E', '\u201C',
+			'\u0123', '\u00DF', '!', '$', '*', ')', ';', '\u00AC', '-', '/',
+			'\u0160', '\u00C4', '\u0104', '\u012E', '\u016A', '\u00C5',
+			'\u0112', '\u017D', '\u00A6', ',', '%', '_', '>', '?', '\u00F8',
+			'\u00C9', '\u0118', '\u0116', '\u010C', '\u0172', '\u012A',
+			'\u013B', '\u0122', '`', ':', '#', '@', '\'', '=', '"', '\u00D8',
+			'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB',
+			'\u0101', '\u017C', '\u0144', '\u00B1', '\u00B0', 'j', 'k', 'l',
+			'm', 'n', 'o', 'p', 'q', 'r', '\u0156', '\u0157', '\u00E6',
+			'\u0137', '\u00C6', '\u00A4', '\u00B5', '~', 's', 't', 'u', 'v',
+			'w', 'x', 'y', 'z', '\u201D', '\u017A', '\u0100', '\u017B',
+			'\u0143', '\u00AE', '^', '\u00A3', '\u012B', '\u00B7', '\u00A9',
+			'\u00A7', '\u00B6', '\u00BC', '\u00BD', '\u00BE', '[', ']',
+			'\u0179', '\u0136', '\u013C', '\u00D7', '{', 'A', 'B', 'C', 'D',
+			'E', 'F', 'G', 'H', 'I', '\u00AD', '\u014D', '\u00F6', '\u0146',
+			'\u00F3', '\u00F5', '}', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q',
+			'R', '\u00B9', '\u0107', '\u00FC', '\u0142', '\u015B', '\u2019',
+			'\\', '\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u014C', '\u00D6', '\u0145', '\u00D3', '\u00D5', '0', '1', '2',
+			'3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u0106', '\u00DC',
+			'\u0141', '\u015A', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID1140.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 1140<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid1140.jsp
+ */
+public final class CCSID1140 extends CodepageConverterAdapter {
+
+	public final static String NAME = "1140";
+	public final static String DESCR = "ECECP: USA, Canada, Netherlands, Portugal, Brazil, Australia, New Zealand";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '\u00E0', '\u00E1', '\u00E3', '\u00E5', '\u00E7',
+			'\u00F1', '\u00A2', '.', '<', '(', '+', '|', '&', '\u00E9',
+			'\u00EA', '\u00EB', '\u00E8', '\u00ED', '\u00EE', '\u00EF',
+			'\u00EC', '\u00DF', '!', '$', '*', ')', ';', '\u00AC', '-', '/',
+			'\u00C2', '\u00C4', '\u00C0', '\u00C1', '\u00C3', '\u00C5',
+			'\u00C7', '\u00D1', '\u00A6', ',', '%', '_', '>', '?', '\u00F8',
+			'\u00C9', '\u00CA', '\u00CB', '\u00C8', '\u00CD', '\u00CE',
+			'\u00CF', '\u00CC', '`', ':', '#', '@', '\'', '=', '"', '\u00D8',
+			'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB',
+			'\u00F0', '\u00FD', '\u00FE', '\u00B1', '\u00B0', 'j', 'k', 'l',
+			'm', 'n', 'o', 'p', 'q', 'r', '\u00AA', '\u00BA', '\u00E6',
+			'\u00B8', '\u00C6', '\u20AC', '\u00B5', '~', 's', 't', 'u', 'v',
+			'w', 'x', 'y', 'z', '\u00A1', '\u00BF', '\u00D0', '\u00DD',
+			'\u00DE', '\u00AE', '^', '\u00A3', '\u00A5', '\u00B7', '\u00A9',
+			'\u00A7', '\u00B6', '\u00BC', '\u00BD', '\u00BE', '[', ']',
+			'\u00AF', '\u00A8', '\u00B4', '\u00D7', '{', 'A', 'B', 'C', 'D',
+			'E', 'F', 'G', 'H', 'I', '\u00AD', '\u00F4', '\u00F6', '\u00F2',
+			'\u00F3', '\u00F5', '}', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q',
+			'R', '\u00B9', '\u00FB', '\u00FC', '\u00F9', '\u00FA', '\u00FF',
+			'\\', '\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u00D4', '\u00D6', '\u00D2', '\u00D3', '\u00D5', '0', '1', '2',
+			'3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB', '\u00DC',
+			'\u00D9', '\u00DA', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID1141.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 1141<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid1141.jsp
+ */
+public final class CCSID1141 extends CodepageConverterAdapter {
+
+	public final static String NAME = "1141";
+	public final static String DESCR = "ECECP: Austria, Germany";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'{', '\u00E0', '\u00E1', '\u00E3', '\u00E5', '\u00E7', '\u00F1',
+			'\u00C4', '.', '<', '(', '+', '!', '&', '\u00E9', '\u00EA',
+			'\u00EB', '\u00E8', '\u00ED', '\u00EE', '\u00EF', '\u00EC', '~',
+			'\u00DC', '$', '*', ')', ';', '^', '-', '/', '\u00C2', '[',
+			'\u00C0', '\u00C1', '\u00C3', '\u00C5', '\u00C7', '\u00D1',
+			'\u00F6', ',', '%', '_', '>', '?', '\u00F8', '\u00C9', '\u00CA',
+			'\u00CB', '\u00C8', '\u00CD', '\u00CE', '\u00CF', '\u00CC', '`',
+			':', '#', '\u00A7', '\'', '=', '"', '\u00D8', 'a', 'b', 'c', 'd',
+			'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB', '\u00F0', '\u00FD',
+			'\u00FE', '\u00B1', '\u00B0', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
+			'q', 'r', '\u00AA', '\u00BA', '\u00E6', '\u00B8', '\u00C6',
+			'\u20AC', '\u00B5', '\u00DF', 's', 't', 'u', 'v', 'w', 'x', 'y',
+			'z', '\u00A1', '\u00BF', '\u00D0', '\u00DD', '\u00DE', '\u00AE',
+			'\u00A2', '\u00A3', '\u00A5', '\u00B7', '\u00A9', '@', '\u00B6',
+			'\u00BC', '\u00BD', '\u00BE', '\u00AC', '|', '\u00AF', '\u00A8',
+			'\u00B4', '\u00D7', '\u00E4', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+			'H', 'I', '\u00AD', '\u00F4', '\u00A6', '\u00F2', '\u00F3',
+			'\u00F5', '\u00FC', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
+			'\u00B9', '\u00FB', '}', '\u00F9', '\u00FA', '\u00FF', '\u00D6',
+			'\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u00D4', '\\', '\u00D2', '\u00D3', '\u00D5', '0', '1', '2', '3',
+			'4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB', ']', '\u00D9',
+			'\u00DA', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID1147.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 1147<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid1147.jsp
+ */
+public final class CCSID1147 extends CodepageConverterAdapter {
+
+	public final static String NAME = "1147";
+	public final static String DESCR = "ECECP: France";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '@', '\u00E1', '\u00E3', '\u00E5', '\\', '\u00F1',
+			'\u00B0', '.', '<', '(', '+', '!', '&', '{', '\u00EA', '\u00EB',
+			'}', '\u00ED', '\u00EE', '\u00EF', '\u00EC', '\u00DF', '\u00A7',
+			'$', '*', ')', ';', '^', '-', '/', '\u00C2', '\u00C4', '\u00C0',
+			'\u00C1', '\u00C3', '\u00C5', '\u00C7', '\u00D1', '\u00F9', ',',
+			'%', '_', '>', '?', '\u00F8', '\u00C9', '\u00CA', '\u00CB',
+			'\u00C8', '\u00CD', '\u00CE', '\u00CF', '\u00CC', '\u00B5', ':',
+			'\u00A3', '\u00E0', '\'', '=', '"', '\u00D8', 'a', 'b', 'c', 'd',
+			'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB', '\u00F0', '\u00FD',
+			'\u00FE', '\u00B1', '[', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
+			'r', '\u00AA', '\u00BA', '\u00E6', '\u00B8', '\u00C6', '\u20AC',
+			'`', '\u00A8', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '\u00A1',
+			'\u00BF', '\u00D0', '\u00DD', '\u00DE', '\u00AE', '\u00A2', '#',
+			'\u00A5', '\u00B7', '\u00A9', ']', '\u00B6', '\u00BC', '\u00BD',
+			'\u00BE', '\u00AC', '|', '\u00AF', '~', '\u00B4', '\u00D7',
+			'\u00E9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', '\u00AD',
+			'\u00F4', '\u00F6', '\u00F2', '\u00F3', '\u00F5', '\u00E8', 'J',
+			'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', '\u00B9', '\u00FB',
+			'\u00FC', '\u00A6', '\u00FA', '\u00FF', '\u00E7', '\u00F7', 'S',
+			'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2', '\u00D4', '\u00D6',
+			'\u00D2', '\u00D3', '\u00D5', '0', '1', '2', '3', '4', '5', '6',
+			'7', '8', '9', '\u00B3', '\u00DB', '\u00DC', '\u00D9', '\u00DA',
+			'\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID1148.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 1148<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid1148.jsp
+ */
+public final class CCSID1148 extends CodepageConverterAdapter {
+
+	public final static String NAME = "1148";
+	public final static String DESCR = "ECECP: International 1";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '\u00E0', '\u00E1', '\u00E3', '\u00E5', '\u00E7',
+			'\u00F1', '[', '.', '<', '(', '+', '!', '&', '\u00E9', '\u00EA',
+			'\u00EB', '\u00E8', '\u00ED', '\u00EE', '\u00EF', '\u00EC',
+			'\u00DF', ']', '$', '*', ')', ';', '^', '-', '/', '\u00C2',
+			'\u00C4', '\u00C0', '\u00C1', '\u00C3', '\u00C5', '\u00C7',
+			'\u00D1', '\u00A6', ',', '%', '_', '>', '?', '\u00F8', '\u00C9',
+			'\u00CA', '\u00CB', '\u00C8', '\u00CD', '\u00CE', '\u00CF',
+			'\u00CC', '`', ':', '#', '@', '\'', '=', '"', '\u00D8', 'a', 'b',
+			'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB', '\u00F0',
+			'\u00FD', '\u00FE', '\u00B1', '\u00B0', 'j', 'k', 'l', 'm', 'n',
+			'o', 'p', 'q', 'r', '\u00AA', '\u00BA', '\u00E6', '\u00B8',
+			'\u00C6', '\u20AC', '\u00B5', '~', 's', 't', 'u', 'v', 'w', 'x',
+			'y', 'z', '\u00A1', '\u00BF', '\u00D0', '\u00DD', '\u00DE',
+			'\u00AE', '\u00A2', '\u00A3', '\u00A5', '\u00B7', '\u00A9',
+			'\u00A7', '\u00B6', '\u00BC', '\u00BD', '\u00BE', '\u00AC', '|',
+			'\u00AF', '\u00A8', '\u00B4', '\u00D7', '{', 'A', 'B', 'C', 'D',
+			'E', 'F', 'G', 'H', 'I', '\u00AD', '\u00F4', '\u00F6', '\u00F2',
+			'\u00F3', '\u00F5', '}', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q',
+			'R', '\u00B9', '\u00FB', '\u00FC', '\u00F9', '\u00FA', '\u00FF',
+			'\\', '\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u00D4', '\u00D6', '\u00D2', '\u00D3', '\u00D5', '0', '1', '2',
+			'3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB', '\u00DC',
+			'\u00D9', '\u00DA', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID273.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,97 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 273<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid273.jsp
+ */
+public final class CCSID273 extends CodepageConverterAdapter {
+
+	public final static String NAME = "273";
+	public final static String DESCR = "CECP: Austria, Germany";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'{', '\u00E0', '\u00E1', '\u00E3', '\u00E5', '\u00E7', '\u00F1',
+			'\u00C4', '.', '<', '(', '+', '!', '&', '\u00E9', '\u00EA',
+			'\u00EB', '\u00E8', '\u00ED', '\u00EE', '\u00EF', '\u00EC', '~',
+			'\u00DC', '$', '*', ')', ';', '^', '-', '/', '\u00C2', '[',
+			'\u00C0', '\u00C1', '\u00C3', '\u00C5', '\u00C7', '\u00D1',
+			'\u00F6', ',', '%', '_', '>', '?', '\u00F8', '\u00C9', '\u00CA',
+			'\u00CB', '\u00C8', '\u00CD', '\u00CE', '\u00CF', '\u00CC', '`',
+			':', '#', '\u00A7', '\'', '=', '"', '\u00D8', 'a', 'b', 'c', 'd',
+			'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB', '\u00F0', '\u00FD',
+			'\u00FE', '\u00B1', '\u00B0', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
+			'q', 'r', '\u00AA', '\u00BA', '\u00E6', '\u00B8', '\u00C6',
+			'\u00A4', '\u00B5', '\u00DF', 's', 't', 'u', 'v', 'w', 'x', 'y',
+			'z', '\u00A1', '\u00BF', '\u00D0', '\u00DD', '\u00DE', '\u00AE',
+			'\u00A2', '\u00A3', '\u00A5', '\u00B7', '\u00A9', '@', '\u00B6',
+			'\u00BC', '\u00BD', '\u00BE', '\u00AC', '|', '\u00AF', '\u00A8',
+			'\u00B4', '\u00D7', '\u00E4', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+			'H', 'I', '\u00AD', '\u00F4', '\u00A6', '\u00F2', '\u00F3',
+			'\u00F5', '\u00FC', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
+			'\u00B9', '\u00FB', '}', '\u00F9', '\u00FA', '\u00FF', '\u00D6',
+			'\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u00D4', '\\', '\u00D2', '\u00D3', '\u00D5', '0', '1', '2', '3',
+			'4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB', ']', '\u00D9',
+			'\u00DA', '\u009F', };
+
+
+	public String getName() {
+		return NAME;
+	}
+	
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID277.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 277<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid277.jsp
+ */
+public final class CCSID277 extends CodepageConverterAdapter {
+
+	public final static String NAME = "277";
+	public final static String DESCR = "CECP: Denmark, Norway";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '\u00E0', '\u00E1', '\u00E3', '}', '\u00E7', '\u00F1',
+			'#', '.', '<', '(', '+', '!', '&', '\u00E9', '\u00EA', '\u00EB',
+			'\u00E8', '\u00ED', '\u00EE', '\u00EF', '\u00EC', '\u00DF',
+			'\u00A4', '\u00C5', '*', ')', ';', '^', '-', '/', '\u00C2',
+			'\u00C4', '\u00C0', '\u00C1', '\u00C3', '$', '\u00C7', '\u00D1',
+			'\u00F8', ',', '%', '_', '>', '?', '\u00A6', '\u00C9', '\u00CA',
+			'\u00CB', '\u00C8', '\u00CD', '\u00CE', '\u00CF', '\u00CC', '`',
+			':', '\u00C6', '\u00D8', '\'', '=', '"', '@', 'a', 'b', 'c', 'd',
+			'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB', '\u00F0', '\u00FD',
+			'\u00FE', '\u00B1', '\u00B0', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
+			'q', 'r', '\u00AA', '\u00BA', '{', '\u00B8', '[', ']', '\u00B5',
+			'\u00FC', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '\u00A1',
+			'\u00BF', '\u00D0', '\u00DD', '\u00DE', '\u00AE', '\u00A2',
+			'\u00A3', '\u00A5', '\u00B7', '\u00A9', '\u00A7', '\u00B6',
+			'\u00BC', '\u00BD', '\u00BE', '\u00AC', '|', '\u00AF', '\u00A8',
+			'\u00B4', '\u00D7', '\u00E6', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+			'H', 'I', '\u00AD', '\u00F4', '\u00F6', '\u00F2', '\u00F3',
+			'\u00F5', '\u00E5', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
+			'\u00B9', '\u00FB', '~', '\u00F9', '\u00FA', '\u00FF', '\\',
+			'\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u00D4', '\u00D6', '\u00D2', '\u00D3', '\u00D5', '0', '1', '2',
+			'3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB', '\u00DC',
+			'\u00D9', '\u00DA', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID278.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 278<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid278.jsp
+ */
+public final class CCSID278 extends CodepageConverterAdapter {
+
+	public final static String NAME = "278";
+	public final static String DESCR = "CECP: Finland, Sweden";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'{', '\u00E0', '\u00E1', '\u00E3', '}', '\u00E7', '\u00F1',
+			'\u00A7', '.', '<', '(', '+', '!', '&', '`', '\u00EA', '\u00EB',
+			'\u00E8', '\u00ED', '\u00EE', '\u00EF', '\u00EC', '\u00DF',
+			'\u00A4', '\u00C5', '*', ')', ';', '^', '-', '/', '\u00C2', '#',
+			'\u00C0', '\u00C1', '\u00C3', '$', '\u00C7', '\u00D1', '\u00F6',
+			',', '%', '_', '>', '?', '\u00F8', '\\', '\u00CA', '\u00CB',
+			'\u00C8', '\u00CD', '\u00CE', '\u00CF', '\u00CC', '\u00E9', ':',
+			'\u00C4', '\u00D6', '\'', '=', '"', '\u00D8', 'a', 'b', 'c', 'd',
+			'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB', '\u00F0', '\u00FD',
+			'\u00FE', '\u00B1', '\u00B0', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
+			'q', 'r', '\u00AA', '\u00BA', '\u00E6', '\u00B8', '\u00C6', ']',
+			'\u00B5', '\u00FC', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
+			'\u00A1', '\u00BF', '\u00D0', '\u00DD', '\u00DE', '\u00AE',
+			'\u00A2', '\u00A3', '\u00A5', '\u00B7', '\u00A9', '[', '\u00B6',
+			'\u00BC', '\u00BD', '\u00BE', '\u00AC', '|', '\u00AF', '\u00A8',
+			'\u00B4', '\u00D7', '\u00E4', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+			'H', 'I', '\u00AD', '\u00F4', '\u00A6', '\u00F2', '\u00F3',
+			'\u00F5', '\u00E5', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
+			'\u00B9', '\u00FB', '~', '\u00F9', '\u00FA', '\u00FF', '\u00C9',
+			'\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u00D4', '@', '\u00D2', '\u00D3', '\u00D5', '0', '1', '2', '3',
+			'4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB', '\u00DC',
+			'\u00D9', '\u00DA', '\u009F' };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID280.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 280<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid280.jsp
+ */
+public final class CCSID280 extends CodepageConverterAdapter {
+
+	public final static String NAME = "280";
+	public final static String DESCR = "CECP: Italy";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '{', '\u00E1', '\u00E3', '\u00E5', '\\', '\u00F1',
+			'\u00B0', '.', '<', '(', '+', '!', '&', ']', '\u00EA', '\u00EB',
+			'}', '\u00ED', '\u00EE', '\u00EF', '~', '\u00DF', '\u00E9', '$',
+			'*', ')', ';', '^', '-', '/', '\u00C2', '\u00C4', '\u00C0',
+			'\u00C1', '\u00C3', '\u00C5', '\u00C7', '\u00D1', '\u00F2', ',',
+			'%', '_', '>', '?', '\u00F8', '\u00C9', '\u00CA', '\u00CB',
+			'\u00C8', '\u00CD', '\u00CE', '\u00CF', '\u00CC', '\u00F9', ':',
+			'\u00A3', '\u00A7', '\'', '=', '"', '\u00D8', 'a', 'b', 'c', 'd',
+			'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB', '\u00F0', '\u00FD',
+			'\u00FE', '\u00B1', '[', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
+			'r', '\u00AA', '\u00BA', '\u00E6', '\u00B8', '\u00C6', '\u00A4',
+			'\u00B5', '\u00EC', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
+			'\u00A1', '\u00BF', '\u00D0', '\u00DD', '\u00DE', '\u00AE',
+			'\u00A2', '#', '\u00A5', '\u00B7', '\u00A9', '@', '\u00B6',
+			'\u00BC', '\u00BD', '\u00BE', '\u00AC', '|', '\u00AF', '\u00A8',
+			'\u00B4', '\u00D7', '\u00E0', 'A', 'B', 'C', 'D', 'E', 'F', 'G',
+			'H', 'I', '\u00AD', '\u00F4', '\u00F6', '\u00A6', '\u00F3',
+			'\u00F5', '\u00E8', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
+			'\u00B9', '\u00FB', '\u00FC', '`', '\u00FA', '\u00FF', '\u00E7',
+			'\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u00D4', '\u00D6', '\u00D2', '\u00D3', '\u00D5', '0', '1', '2',
+			'3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB', '\u00DC',
+			'\u00D9', '\u00DA', '\u009F' };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID284.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 284<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid284.jsp
+ */
+public final class CCSID284 extends CodepageConverterAdapter {
+
+	public final static String NAME = "284";
+	public final static String DESCR = "CECP: Spain, Latin America (Spanish)";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '\u00E0', '\u00E1', '\u00E3', '\u00E5', '\u00E7',
+			'\u00A6', '[', '.', '<', '(', '+', '|', '&', '\u00E9', '\u00EA',
+			'\u00EB', '\u00E8', '\u00ED', '\u00EE', '\u00EF', '\u00EC',
+			'\u00DF', ']', '$', '*', ')', ';', '\u00AC', '-', '/', '\u00C2',
+			'\u00C4', '\u00C0', '\u00C1', '\u00C3', '\u00C5', '\u00C7', '#',
+			'\u00F1', ',', '%', '_', '>', '?', '\u00F8', '\u00C9', '\u00CA',
+			'\u00CB', '\u00C8', '\u00CD', '\u00CE', '\u00CF', '\u00CC', '`',
+			':', '\u00D1', '@', '\'', '=', '"', '\u00D8', 'a', 'b', 'c', 'd',
+			'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB', '\u00F0', '\u00FD',
+			'\u00FE', '\u00B1', '\u00B0', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
+			'q', 'r', '\u00AA', '\u00BA', '\u00E6', '\u00B8', '\u00C6',
+			'\u00A4', '\u00B5', '\u00A8', 's', 't', 'u', 'v', 'w', 'x', 'y',
+			'z', '\u00A1', '\u00BF', '\u00D0', '\u00DD', '\u00DE', '\u00AE',
+			'\u00A2', '\u00A3', '\u00A5', '\u00B7', '\u00A9', '\u00A7',
+			'\u00B6', '\u00BC', '\u00BD', '\u00BE', '^', '!', '\u00AF', '~',
+			'\u00B4', '\u00D7', '{', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
+			'I', '\u00AD', '\u00F4', '\u00F6', '\u00F2', '\u00F3', '\u00F5',
+			'}', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', '\u00B9',
+			'\u00FB', '\u00FC', '\u00F9', '\u00FA', '\u00FF', '\\', '\u00F7',
+			'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2', '\u00D4',
+			'\u00D6', '\u00D2', '\u00D3', '\u00D5', '0', '1', '2', '3', '4',
+			'5', '6', '7', '8', '9', '\u00B3', '\u00DB', '\u00DC', '\u00D9',
+			'\u00DA', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID285.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 285<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid285.jsp
+ */
+public final class CCSID285 extends CodepageConverterAdapter {
+
+	public final static String NAME = "285";
+	public final static String DESCR = "CECP: United Kingdom";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '\u00E0', '\u00E1', '\u00E3', '\u00E5', '\u00E7',
+			'\u00F1', '$', '.', '<', '(', '+', '|', '&', '\u00E9', '\u00EA',
+			'\u00EB', '\u00E8', '\u00ED', '\u00EE', '\u00EF', '\u00EC',
+			'\u00DF', '!', '\u00A3', '*', ')', ';', '\u00AC', '-', '/',
+			'\u00C2', '\u00C4', '\u00C0', '\u00C1', '\u00C3', '\u00C5',
+			'\u00C7', '\u00D1', '\u00A6', ',', '%', '_', '>', '?', '\u00F8',
+			'\u00C9', '\u00CA', '\u00CB', '\u00C8', '\u00CD', '\u00CE',
+			'\u00CF', '\u00CC', '`', ':', '#', '@', '\'', '=', '"', '\u00D8',
+			'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB',
+			'\u00F0', '\u00FD', '\u00FE', '\u00B1', '\u00B0', 'j', 'k', 'l',
+			'm', 'n', 'o', 'p', 'q', 'r', '\u00AA', '\u00BA', '\u00E6',
+			'\u00B8', '\u00C6', '\u00A4', '\u00B5', '\u00AF', 's', 't', 'u',
+			'v', 'w', 'x', 'y', 'z', '\u00A1', '\u00BF', '\u00D0', '\u00DD',
+			'\u00DE', '\u00AE', '\u00A2', '[', '\u00A5', '\u00B7', '\u00A9',
+			'\u00A7', '\u00B6', '\u00BC', '\u00BD', '\u00BE', '^', ']', '~',
+			'\u00A8', '\u00B4', '\u00D7', '{', 'A', 'B', 'C', 'D', 'E', 'F',
+			'G', 'H', 'I', '\u00AD', '\u00F4', '\u00F6', '\u00F2', '\u00F3',
+			'\u00F5', '}', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
+			'\u00B9', '\u00FB', '\u00FC', '\u00F9', '\u00FA', '\u00FF', '\\',
+			'\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u00D4', '\u00D6', '\u00D2', '\u00D3', '\u00D5', '0', '1', '2',
+			'3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB', '\u00DC',
+			'\u00D9', '\u00DA', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID297.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 297<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid297.jsp
+ */
+public final class CCSID297 extends CodepageConverterAdapter {
+
+	public final static String NAME = "297";
+	public final static String DESCR = "CECP: France";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '@', '\u00E1', '\u00E3', '\u00E5', '\\', '\u00F1',
+			'\u00B0', '.', '<', '(', '+', '!', '&', '{', '\u00EA', '\u00EB',
+			'}', '\u00ED', '\u00EE', '\u00EF', '\u00EC', '\u00DF', '\u00A7',
+			'$', '*', ')', ';', '^', '-', '/', '\u00C2', '\u00C4', '\u00C0',
+			'\u00C1', '\u00C3', '\u00C5', '\u00C7', '\u00D1', '\u00F9', ',',
+			'%', '_', '>', '?', '\u00F8', '\u00C9', '\u00CA', '\u00CB',
+			'\u00C8', '\u00CD', '\u00CE', '\u00CF', '\u00CC', '\u00B5', ':',
+			'\u00A3', '\u00E0', '\'', '=', '"', '\u00D8', 'a', 'b', 'c', 'd',
+			'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB', '\u00F0', '\u00FD',
+			'\u00FE', '\u00B1', '[', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q',
+			'r', '\u00AA', '\u00BA', '\u00E6', '\u00B8', '\u00C6', '\u00A4',
+			'`', '\u00A8', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '\u00A1',
+			'\u00BF', '\u00D0', '\u00DD', '\u00DE', '\u00AE', '\u00A2', '#',
+			'\u00A5', '\u00B7', '\u00A9', ']', '\u00B6', '\u00BC', '\u00BD',
+			'\u00BE', '\u00AC', '|', '\u00AF', '~', '\u00B4', '\u00D7',
+			'\u00E9', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', '\u00AD',
+			'\u00F4', '\u00F6', '\u00F2', '\u00F3', '\u00F5', '\u00E8', 'J',
+			'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', '\u00B9', '\u00FB',
+			'\u00FC', '\u00A6', '\u00FA', '\u00FF', '\u00E7', '\u00F7', 'S',
+			'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2', '\u00D4', '\u00D6',
+			'\u00D2', '\u00D3', '\u00D5', '0', '1', '2', '3', '4', '5', '6',
+			'7', '8', '9', '\u00B3', '\u00DB', '\u00DC', '\u00D9', '\u00DA',
+			'\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID37.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,98 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 37<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid37.jsp
+ */
+public final class CCSID37 extends CodepageConverterAdapter {
+
+	public final static String NAME = "37";
+	public final static String DESCR = "CECP: USA, Canada (ESA*), Netherlands, Portugal, Brazil, Australia, New Zealand";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '\u00E0', '\u00E1', '\u00E3', '\u00E5', '\u00E7',
+			'\u00F1', '\u00A2', '.', '<', '(', '+', '|', '&', '\u00E9',
+			'\u00EA', '\u00EB', '\u00E8', '\u00ED', '\u00EE', '\u00EF',
+			'\u00EC', '\u00DF', '!', '$', '*', ')', ';', '\u00AC', '-', '/',
+			'\u00C2', '\u00C4', '\u00C0', '\u00C1', '\u00C3', '\u00C5',
+			'\u00C7', '\u00D1', '\u00A6', ',', '%', '_', '>', '?', '\u00F8',
+			'\u00C9', '\u00CA', '\u00CB', '\u00C8', '\u00CD', '\u00CE',
+			'\u00CF', '\u00CC', '`', ':', '#', '@', '\'', '=', '"', '\u00D8',
+			'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB',
+			'\u00F0', '\u00FD', '\u00FE', '\u00B1', '\u00B0', 'j', 'k', 'l',
+			'm', 'n', 'o', 'p', 'q', 'r', '\u00AA', '\u00BA', '\u00E6',
+			'\u00B8', '\u00C6', '\u00A4', '\u00B5', '~', 's', 't', 'u', 'v',
+			'w', 'x', 'y', 'z', '\u00A1', '\u00BF', '\u00D0', '\u00DD',
+			'\u00DE', '\u00AE', '^', '\u00A3', '\u00A5', '\u00B7', '\u00A9',
+			'\u00A7', '\u00B6', '\u00BC', '\u00BD', '\u00BE', '[', ']',
+			'\u00AF', '\u00A8', '\u00B4', '\u00D7', '{', 'A', 'B', 'C', 'D',
+			'E', 'F', 'G', 'H', 'I', '\u00AD', '\u00F4', '\u00F6', '\u00F2',
+			'\u00F3', '\u00F5', '}', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q',
+			'R', '\u00B9', '\u00FB', '\u00FC', '\u00F9', '\u00FA', '\u00FF',
+			'\\', '\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u00D4', '\u00D6', '\u00D2', '\u00D3', '\u00D5', '0', '1', '2',
+			'3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB', '\u00DC',
+			'\u00D9', '\u00DA', '\u009F', };
+
+	
+	public String getName() {
+		return NAME;
+	}
+	
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID424.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 424<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid424.jsp
+ */
+public final class CCSID424 extends CodepageConverterAdapter {
+
+	public final static String NAME = "424";
+	public final static String DESCR = "Hebrew";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u05D0', '\u05D1',
+			'\u05D2', '\u05D3', '\u05D4', '\u05D5', '\u05D6', '\u05D7',
+			'\u05D8', '\u00A2', '.', '<', '(', '+', '|', '&', '\u05D9',
+			'\u05DA', '\u05DB', '\u05DC', '\u05DD', '\u05DE', '\u05DF',
+			'\u05E0', '\u05E1', '!', '$', '*', ')', ';', '\u00AC', '-', '/',
+			'\u05E2', '\u05E3', '\u05E4', '\u05E5', '\u05E6', '\u05E7',
+			'\u05E8', '\u05E9', '\u00A6', ',', '%', '_', '>', '?', '\u001A',
+			'\u05EA', '\u001A', '\u001A', '\u00A0', '\u001A', '\u001A',
+			'\u001A', '\u2017', '`', ':', '#', '@', '\'', '=', '"', '\u001A',
+			'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB',
+			'\u001A', '\u001A', '\u001A', '\u00B1', '\u00B0', 'j', 'k', 'l',
+			'm', 'n', 'o', 'p', 'q', 'r', '\u001A', '\u001A', '\u20AC',
+			'\u00B8', '\u20AA', '\u00A4', '\u00B5', '~', 's', 't', 'u', 'v',
+			'w', 'x', 'y', 'z', '\u001A', '\u001A', '\u001A', '\u001A',
+			'\u001A', '\u00AE', '^', '\u00A3', '\u00A5', '\u2022', '\u00A9',
+			'\u00A7', '\u00B6', '\u00BC', '\u00BD', '\u00BE', '[', ']',
+			'\u203E', '\u00A8', '\u00B4', '\u00D7', '{', 'A', 'B', 'C', 'D',
+			'E', 'F', 'G', 'H', 'I', '\u00AD', '\u001A', '\u001A', '\u001A',
+			'\u001A', '\u001A', '}', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q',
+			'R', '\u00B9', '\u202D', '\u202E', '\u202C', '\u001A', '\u001A',
+			'\\', '\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u001A', '\u001A', '\u001A', '\u001A', '\u001A', '0', '1', '2',
+			'3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u202A', '\u202B',
+			'\u200E', '\u200F', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID500.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 500<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid500.jsp
+ */
+public final class CCSID500 extends CodepageConverterAdapter {
+
+	public final static String NAME = "500";
+	public final static String DESCR = "CECP: Belgium, Canada (AS/400*), Switzerland, International Latin-1";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '\u00E0', '\u00E1', '\u00E3', '\u00E5', '\u00E7',
+			'\u00F1', '[', '.', '<', '(', '+', '!', '&', '\u00E9', '\u00EA',
+			'\u00EB', '\u00E8', '\u00ED', '\u00EE', '\u00EF', '\u00EC',
+			'\u00DF', ']', '$', '*', ')', ';', '^', '-', '/', '\u00C2',
+			'\u00C4', '\u00C0', '\u00C1', '\u00C3', '\u00C5', '\u00C7',
+			'\u00D1', '\u00A6', ',', '%', '_', '>', '?', '\u00F8', '\u00C9',
+			'\u00CA', '\u00CB', '\u00C8', '\u00CD', '\u00CE', '\u00CF',
+			'\u00CC', '`', ':', '#', '@', '\'', '=', '"', '\u00D8', 'a', 'b',
+			'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u00AB', '\u00BB', '\u00F0',
+			'\u00FD', '\u00FE', '\u00B1', '\u00B0', 'j', 'k', 'l', 'm', 'n',
+			'o', 'p', 'q', 'r', '\u00AA', '\u00BA', '\u00E6', '\u00B8',
+			'\u00C6', '\u00A4', '\u00B5', '~', 's', 't', 'u', 'v', 'w', 'x',
+			'y', 'z', '\u00A1', '\u00BF', '\u00D0', '\u00DD', '\u00DE',
+			'\u00AE', '\u00A2', '\u00A3', '\u00A5', '\u00B7', '\u00A9',
+			'\u00A7', '\u00B6', '\u00BC', '\u00BD', '\u00BE', '\u00AC', '|',
+			'\u00AF', '\u00A8', '\u00B4', '\u00D7', '{', 'A', 'B', 'C', 'D',
+			'E', 'F', 'G', 'H', 'I', '\u00AD', '\u00F4', '\u00F6', '\u00F2',
+			'\u00F3', '\u00F5', '}', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q',
+			'R', '\u00B9', '\u00FB', '\u00FC', '\u00F9', '\u00FA', '\u00FF',
+			'\\', '\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '\u00B2',
+			'\u00D4', '\u00D6', '\u00D2', '\u00D3', '\u00D5', '0', '1', '2',
+			'3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB', '\u00DC',
+			'\u00D9', '\u00DA', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID870.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 870<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid870.jsp
+ */
+public final class CCSID870 extends CodepageConverterAdapter {
+
+	public final static String NAME = "870";
+	public final static String DESCR = "Latin 2 - EBCDIC Multilingual";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '\u0163', '\u00E1', '\u0103', '\u010D', '\u00E7',
+			'\u0107', '[', '.', '<', '(', '+', '!', '&', '\u00E9', '\u0119',
+			'\u00EB', '\u016F', '\u00ED', '\u00EE', '\u013E', '\u013A',
+			'\u00DF', ']', '$', '*', ')', ';', '^', '-', '/', '\u00C2',
+			'\u00C4', '\u02DD', '\u00C1', '\u0102', '\u010C', '\u00C7',
+			'\u0106', '|', ',', '%', '_', '>', '?', '\u02C7', '\u00C9',
+			'\u0118', '\u00CB', '\u016E', '\u00CD', '\u00CE', '\u013D',
+			'\u0139', '`', ':', '#', '@', '\'', '=', '"', '\u02D8', 'a', 'b',
+			'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u015B', '\u0148', '\u0111',
+			'\u00FD', '\u0159', '\u015F', '\u00B0', 'j', 'k', 'l', 'm', 'n',
+			'o', 'p', 'q', 'r', '\u0142', '\u0144', '\u0161', '\u00B8',
+			'\u02DB', '\u00A4', '\u0105', '~', 's', 't', 'u', 'v', 'w', 'x',
+			'y', 'z', '\u015A', '\u0147', '\u0110', '\u00DD', '\u0158',
+			'\u015E', '\u02D9', '\u0104', '\u017C', '\u0162', '\u017B',
+			'\u00A7', '\u017E', '\u017A', '\u017D', '\u0179', '\u0141',
+			'\u0143', '\u0160', '\u00A8', '\u00B4', '\u00D7', '{', 'A', 'B',
+			'C', 'D', 'E', 'F', 'G', 'H', 'I', '\u00AD', '\u00F4', '\u00F6',
+			'\u0155', '\u00F3', '\u0151', '}', 'J', 'K', 'L', 'M', 'N', 'O',
+			'P', 'Q', 'R', '\u011A', '\u0171', '\u00FC', '\u0165', '\u00FA',
+			'\u011B', '\\', '\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+			'\u010F', '\u00D4', '\u00D6', '\u0154', '\u00D3', '\u0150', '0',
+			'1', '2', '3', '4', '5', '6', '7', '8', '9', '\u010E', '\u0170',
+			'\u00DC', '\u0164', '\u00DA', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID871.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 871<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid871.jsp
+ */
+public final class CCSID871 extends CodepageConverterAdapter {
+
+	public final static String NAME = "871";
+	public final static String DESCR = "CECP: Iceland";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u00A0', '\u00E2',
+			'\u00E4', '\u00E0', '\u00E1', '\u00E3', '\u00E5', '\u00E7',
+			'\u00F1', '\u00DE', '.', '<', '(', '+', '!', '&', '\u00E9',
+			'\u00EA', '\u00EB', '\u00E8', '\u00ED', '\u00EE', '\u00EF',
+			'\u00EC', '\u00DF', '\u00C6', '$', '*', ')', ';', '\u00D6', '-',
+			'/', '\u00C2', '\u00C4', '\u00C0', '\u00C1', '\u00C3', '\u00C5',
+			'\u00C7', '\u00D1', '\u00A6', ',', '%', '_', '>', '?', '\u00F8',
+			'\u00C9', '\u00CA', '\u00CB', '\u00C8', '\u00CD', '\u00CE',
+			'\u00CF', '\u00CC', '\u00F0', ':', '#', '\u00D0', '\'', '=', '"',
+			'\u00D8', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u00AB',
+			'\u00BB', '`', '\u00FD', '{', '\u00B1', '\u00B0', 'j', 'k', 'l',
+			'm', 'n', 'o', 'p', 'q', 'r', '\u00AA', '\u00BA', '}', '\u00B8',
+			']', '\u00A4', '\u00B5', '\u00F6', 's', 't', 'u', 'v', 'w', 'x',
+			'y', 'z', '\u00A1', '\u00BF', '@', '\u00DD', '[', '\u00AE',
+			'\u00A2', '\u00A3', '\u00A5', '\u00B7', '\u00A9', '\u00A7',
+			'\u00B6', '\u00BC', '\u00BD', '\u00BE', '\u00AC', '|', '\u00AF',
+			'\u00A8', '\\', '\u00D7', '\u00FE', 'A', 'B', 'C', 'D', 'E', 'F',
+			'G', 'H', 'I', '\u00AD', '\u00F4', '~', '\u00F2', '\u00F3',
+			'\u00F5', '\u00E6', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
+			'\u00B9', '\u00FB', '\u00FC', '\u00F9', '\u00FA', '\u00FF',
+			'\u00B4', '\u00F7', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+			'\u00B2', '\u00D4', '^', '\u00D2', '\u00D3', '\u00D5', '0', '1',
+			'2', '3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u00DB',
+			'\u00DC', '\u00D9', '\u00DA', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CCSID875.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,95 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ * Alternative (extended) implementation of a codepage converter CCSID 875<->Unicode. 
+ *
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+/**
+ * @author master_jaf
+ * @see http://www-01.ibm.com/software/globalization/ccsid/ccsid875.jsp
+ */
+public final class CCSID875 extends CodepageConverterAdapter {
+
+	public final static String NAME = "875";
+	public final static String DESCR = "Greek";
+
+	/*
+	 * Char maps manually extracted from JTOpen v6.4. Because char maps can't be
+	 * covered by any license, this should legal.
+	 */
+	private static final char[] codepage = { '\u0000', '\u0001', '\u0002',
+			'\u0003', '\u009C', '\t', '\u0086', '\u007F', '\u0097', '\u008D',
+			'\u008E', '\u000B', '\f', '\r', '\u000E', '\u000F', '\u0010',
+			'\u0011', '\u0012', '\u0013', '\u009D', '\u0085', '\u0008',
+			'\u0087', '\u0018', '\u0019', '\u0092', '\u008F', '\u001C',
+			'\u001D', '\u001E', '\u001F', '\u0080', '\u0081', '\u0082',
+			'\u0083', '\u0084', '\n', '\u0017', '\u001B', '\u0088', '\u0089',
+			'\u008A', '\u008B', '\u008C', '\u0005', '\u0006', '\u0007',
+			'\u0090', '\u0091', '\u0016', '\u0093', '\u0094', '\u0095',
+			'\u0096', '\u0004', '\u0098', '\u0099', '\u009A', '\u009B',
+			'\u0014', '\u0015', '\u009E', '\u001A', ' ', '\u0391', '\u0392',
+			'\u0393', '\u0394', '\u0395', '\u0396', '\u0397', '\u0398',
+			'\u0399', '[', '.', '<', '(', '+', '!', '&', '\u039A', '\u039B',
+			'\u039C', '\u039D', '\u039E', '\u039F', '\u03A0', '\u03A1',
+			'\u03A3', ']', '$', '*', ')', ';', '^', '-', '/', '\u03A4',
+			'\u03A5', '\u03A6', '\u03A7', '\u03A8', '\u03A9', '\u03AA',
+			'\u03AB', '|', ',', '%', '_', '>', '?', '\u00A8', '\u0386',
+			'\u0388', '\u0389', '\u00A0', '\u038A', '\u038C', '\u038E',
+			'\u038F', '`', ':', '#', '@', '\'', '=', '"', '\u0385', 'a', 'b',
+			'c', 'd', 'e', 'f', 'g', 'h', 'i', '\u03B1', '\u03B2', '\u03B3',
+			'\u03B4', '\u03B5', '\u03B6', '\u00B0', 'j', 'k', 'l', 'm', 'n',
+			'o', 'p', 'q', 'r', '\u03B7', '\u03B8', '\u03B9', '\u03BA',
+			'\u03BB', '\u03BC', '\u00B4', '~', 's', 't', 'u', 'v', 'w', 'x',
+			'y', 'z', '\u03BD', '\u03BE', '\u03BF', '\u03C0', '\u03C1',
+			'\u03C3', '\u00A3', '\u03AC', '\u03AD', '\u03AE', '\u03CA',
+			'\u03AF', '\u03CC', '\u03CD', '\u03CB', '\u03CE', '\u03C2',
+			'\u03C4', '\u03C5', '\u03C6', '\u03C7', '\u03C8', '{', 'A', 'B',
+			'C', 'D', 'E', 'F', 'G', 'H', 'I', '\u00AD', '\u03C9', '\u0390',
+			'\u03B0', '\u2018', '\u2015', '}', 'J', 'K', 'L', 'M', 'N', 'O',
+			'P', 'Q', 'R', '\u00B1', '\u00BD', '\u001A', '\u0387', '\u2019',
+			'\u00A6', '\\', '\u001A', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
+			'\u00B2', '\u00A7', '\u001A', '\u001A', '\u00AB', '\u00AC', '0',
+			'1', '2', '3', '4', '5', '6', '7', '8', '9', '\u00B3', '\u00A9',
+			'\u001A', '\u001A', '\u00BB', '\u009F', };
+
+	public String getName() {
+		return NAME;
+	}
+
+	public String getDescription() {
+		return DESCR;
+	}
+
+	public String getEncoding() {
+		return NAME;
+	}
+
+	@Override
+	protected char[] getCodePage() {
+		return codepage;
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/CodepageConverterAdapter.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,82 @@
+/**
+ * $Id$
+ * 
+ * Title: tn5250J
+ * Copyright:   Copyright (c) 2001,2009
+ * Company:
+ * @author: master_jaf
+ *
+ * Description:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.encoding.builtin;
+
+import java.util.Arrays;
+
+/**
+ * Adapter class for converters using 8bit codepages.
+ * 
+ * @author master_jaf
+ */
+public abstract class CodepageConverterAdapter implements ICodepageConverter {
+	
+	private char[] codepage = null;
+	private int[] reverse_codepage = null;
+	
+	/* (non-Javadoc)
+	 * @see org.tn5250j.cp.ICodepageConverter#init()
+	 */
+	public ICodepageConverter init() {
+		codepage = getCodePage();
+		
+		int size = 0;
+		for (int i=0; i<codepage.length; i++) {
+			size = Math.max(size, codepage[i]);
+		}
+		assert (size + 1) < 1024*1024; // some kind of maximum size limiter.
+		reverse_codepage = new int[size+1];
+		Arrays.fill(reverse_codepage, '?');
+		for (int i=0; i<codepage.length; i++) {
+			reverse_codepage[codepage[i]] = i;
+		}
+		return this;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.tn5250j.cp.ICodepageConverter#uni2ebcdic(char)
+	 */
+	public byte uni2ebcdic(char index) {
+		assert index < reverse_codepage.length;
+		return (byte)reverse_codepage[index];
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.tn5250j.cp.ICodepageConverter#ebcdic2uni(int)
+	 */
+	public char ebcdic2uni(int index) {
+		index = index & 0xFF;
+		assert index < 256;
+		return codepage[index];
+	}
+
+	/**
+	 * @return The oringal 8bit codepage. 
+	 */
+	protected abstract char[] getCodePage();
+	
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/encoding/builtin/ICodepageConverter.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,34 @@
+package org.tn5250j.encoding.builtin;
+
+import org.tn5250j.encoding.ICodePage;
+
+/**
+ * Interface for classes which do the translation from
+ * EBCDIC bytes to Unicode characters and vice versa.
+ * 
+ */
+public interface ICodepageConverter extends ICodePage {
+
+	/**
+	 * Returns an name/ID for this converter.
+	 * Example '273' or 'CP1252'. This name should be unique,
+	 * cause it's used in user settungs and so on.
+	 * 
+	 * @return
+	 */
+	public abstract String getName();
+	
+	/**
+	 * Returns a short description for this converter.
+	 * For Example '273 - German, EBCDIC'
+	 * 
+	 * @return
+	 */
+	public abstract String getDescription();
+		
+	/**
+	 * Does special initialization stuff for this converter.
+	 */
+	public abstract ICodepageConverter init();
+	
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/event/ScreenListener.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,36 @@
+/**
+ * Title: ScreenListener.java
+ * Copyright:   Copyright (c) 2001
+ * Company:
+ * @author  Kenneth J. Pouncey
+ * @version 0.5
+ *
+ * Description:
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+
+package org.tn5250j.event;
+
+public interface ScreenListener {
+
+   public void onScreenChanged(int inUpdate, int startRow, int startCol,
+                                             int endRow, int endCol);
+
+   public void onScreenSizeChanged(int rows, int cols);
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/tools/logging/ConsoleLogger.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,134 @@
+/*
+ * @(#)ConsoleLogger.java
+ * @author  Kenneth J. Pouncey
+ *
+ * Copyright:    Copyright (c) 2001, 2002, 2003
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.tools.logging;
+
+/**
+ * An implementation of the TN5250jLogger to provide logger instances to the
+ * console - System.out or System.err.
+ */
+public final class ConsoleLogger implements TN5250jLogger {
+
+	private int logLevel = TN5250jLogger.WARN;
+
+	private String clazz = null;
+
+	/*
+	 * Package level access only  
+	 */
+	ConsoleLogger() {
+
+	}
+
+	public void initialize(final String clazz) {
+		this.clazz = clazz;
+	}
+
+	public void debug(Object message) {
+		if (isDebugEnabled())
+			System.out.println("DEBUG [" + clazz + "] " + ((message!=null) ? message.toString() : ""));
+	}
+
+	public void debug(Object message, Throwable throwable) {
+		if (isDebugEnabled())
+			System.out.println("DEBUG [" + clazz + "] "
+					+ ((message!=null) ? message.toString() : "")
+					+ ((throwable!=null) ? throwable.getMessage() : ""));
+	}
+	
+	public void info(Object message) {
+		if (isInfoEnabled())
+			System.out.println("INFO [" + clazz + "] " + ((message!=null) ? message.toString() : ""));
+	}
+
+	public void info(Object message, Throwable throwable) {
+		if (isInfoEnabled())
+			System.out.println("INFO [" + clazz + "] "
+					+ ((message!=null) ? message.toString() : "")
+					+ ((throwable!=null) ? throwable.getMessage() : ""));
+	}
+	
+	public void warn(Object message) {
+		if (isWarnEnabled())
+			System.err.println("WARN [" + clazz + "] " + ((message!=null) ? message.toString() : ""));
+	}
+
+	public void warn(Object message, Throwable throwable) {
+		if (isWarnEnabled())
+			System.err.println("WARN [" + clazz + "] "
+					+ ((message!=null) ? message.toString() : "")
+					+ ((throwable!=null) ? throwable.getMessage() : ""));
+	}
+
+	public void error(Object message) {
+		if (isErrorEnabled())
+			System.err.println("ERROR [" + clazz + "] " + ((message!=null) ? message.toString() : ""));
+	}
+
+	public void error(Object message, Throwable throwable) {
+		if (isErrorEnabled())
+			System.err.println("ERROR [" + clazz + "] "
+					+ ((message!=null) ? message.toString() : "")
+					+ ((throwable!=null) ? throwable.getMessage() : ""));
+	}
+
+	public void fatal(Object message) {
+		if (isFatalEnabled())
+			System.err.println("FATAL [" + clazz + "] " + ((message!=null) ? message.toString() : ""));
+	}
+
+	public void fatal(Object message, Throwable throwable) {
+		if (isFatalEnabled())
+			System.err.println("FATAL [" + clazz + "] "
+					+ ((message!=null) ? message.toString() : "")
+					+ ((throwable!=null) ? throwable.getMessage() : ""));
+	}
+
+	public boolean isDebugEnabled() {
+		return (logLevel <= DEBUG); // 1
+	}
+
+	public boolean isInfoEnabled() {
+		return (logLevel <= INFO);  // 2
+	}
+
+	public boolean isWarnEnabled() {
+		return (logLevel <= WARN);  // 4
+	}
+
+	public boolean isErrorEnabled() {
+		return (logLevel <= ERROR); // 8
+	}
+	
+	public boolean isFatalEnabled() {
+		return (logLevel <= FATAL); // 16
+	}
+
+	public int getLevel() {
+		return logLevel;
+	}
+
+	public void setLevel(int newLevel) {
+		logLevel = newLevel;
+	}
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/tools/logging/Log4jLogger.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,159 @@
+/*
+ * @(#)Log4jLogger.java
+ * @author  Kenneth J. Pouncey
+ *
+ * Copyright:    Copyright (c) 2001, 2002, 2003
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.tools.logging;
+
+import org.apache.log4j.Level;
+import org.apache.log4j.Logger;
+
+/**
+ * An implementation of the TN5250jLogger to provide log4j logger instances.
+ */
+public final class Log4jLogger implements TN5250jLogger {
+
+	private Logger log = null;
+
+	/*
+	 * Package level access only
+	 */
+	Log4jLogger() {
+
+	}
+
+	public void initialize(final String clazz) {
+		log = Logger.getLogger(clazz);
+	}
+
+	public void debug(Object message) {
+		log.debug(message);
+	}
+
+	public void debug(Object message, Throwable throwable) {
+		log.debug(message, throwable);
+	}
+
+	public void info(Object message) {
+		log.info(message);
+	}
+	
+	public void info(Object message, Throwable throwable) {
+		log.info(message, throwable);
+	}
+
+	public void warn(Object message) {
+		log.warn(message);
+	}
+
+	public void warn(Object message, Throwable throwable) {
+		log.warn(message, throwable);
+	}
+
+	public void error(Object message) {
+		log.error(message);
+	}
+	
+	public void error(Object message, Throwable throwable) {
+		log.error(message, throwable);
+	}
+
+	public void fatal(Object message) {
+		log.fatal(message);
+	}
+	
+	public void fatal(Object message, Throwable throwable) {
+		log.fatal(message, throwable);
+	}
+
+	public boolean isDebugEnabled() {
+		return log.isDebugEnabled();
+	}
+
+	public boolean isInfoEnabled() {
+		return log.isInfoEnabled();
+	}
+	
+	public boolean isWarnEnabled() {
+		return (Level.WARN.equals(log.getLevel()));
+	}
+
+	public boolean isFatalEnabled() {
+		return (Level.FATAL.equals(log.getLevel()));
+	}
+	
+	public boolean isErrorEnabled() {
+		return (Level.ERROR.equals(log.getLevel()));
+	}
+	
+	public void setLevel(int newLevel) {
+
+		switch (newLevel) {
+		case OFF:
+			log.setLevel(Level.OFF);
+			break;
+
+		case DEBUG:
+			log.setLevel(Level.DEBUG);
+			break;
+
+		case INFO:
+			log.setLevel(Level.INFO);
+			break;
+
+		case WARN:
+			log.setLevel(Level.WARN);
+			break;
+
+		case ERROR:
+			log.setLevel(Level.ERROR);
+			break;
+
+		case FATAL:
+			log.setLevel(Level.FATAL);
+			break;
+		}
+
+	}
+
+	public int getLevel() {
+
+		switch (log.getLevel().toInt()) {
+
+		case (org.apache.log4j.Level.DEBUG_INT):
+			return DEBUG;
+
+		case (org.apache.log4j.Level.INFO_INT):
+			return INFO;
+
+		case (org.apache.log4j.Level.WARN_INT):
+			return WARN;
+
+		case (org.apache.log4j.Level.ERROR_INT):
+			return ERROR;
+
+		case (org.apache.log4j.Level.FATAL_INT):
+			return FATAL;
+		default:
+			return WARN;
+		}
+
+	}
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/tools/logging/TN5250jLogFactory.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,143 @@
+/*
+ * @(#)TN5250jLogFactory.java
+ * @author  Kenneth J. Pouncey
+ *
+ * Copyright:    Copyright (c) 2001, 2002, 2003
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.tools.logging;
+
+import java.util.*;
+
+import org.tn5250j.tools.logging.TN5250jLogger;
+import org.tn5250j.interfaces.ConfigureFactory;
+
+/**
+ * An interface defining objects that can create Configure
+ * instances.
+ *
+ * The model for the HashMap implementation of loggers came from the POI project
+ * thanks to Nicola Ken Barozzi (nicolaken at apache.org) for the reference.
+ *
+ */
+public final class TN5250jLogFactory {
+
+   // map of TN5250jLogger instances, with classes as keys
+   private static Map<String, TN5250jLogger> _loggers = new HashMap<String, TN5250jLogger>();
+   private static boolean log4j;
+   private static String customLogger;
+   private static int level = TN5250jLogger.INFO;
+
+   /**
+    * Here we try to do a little more work up front.
+    */
+   static {
+
+      try {
+         Properties props =
+            ConfigureFactory.getInstance().getProperties(
+               ConfigureFactory.SESSIONS);
+
+
+         level = Integer.parseInt(props.getProperty("emul.logLevel",
+                           Integer.toString(TN5250jLogger.INFO)));
+
+         String  customLogger = System.getProperty(TN5250jLogFactory.class.getName());
+         if (customLogger == null) {
+            try {
+               Class.forName("org.apache.log4j.Logger");
+               log4j = true;
+            }
+            catch (Exception ignore) { ; }
+         }
+
+      }
+      catch (Exception ignore) { ; }
+
+   }
+
+   /**
+    * Set package access only so we have to use getLogger() to return a logger object.
+    */
+   TN5250jLogFactory() {
+
+   }
+
+   /**
+    * @return An instance of the TN5250jLogger.
+    */
+   public static TN5250jLogger getLogger (Class<?> clazz) {
+      return getLogger(clazz.getName());
+   }
+
+   /**
+    * @return An instance of the TN5250jLogger.
+    */
+   public static TN5250jLogger getLogger (String clazzName) {
+      TN5250jLogger logger = null;
+
+      if (_loggers.containsKey(clazzName)) {
+         logger = _loggers.get(clazzName);
+      } else {
+
+         if (customLogger != null) {
+            try {
+
+               Class<?> classObject = Class.forName(customLogger);
+               Object  object = classObject.newInstance();
+               if (object instanceof TN5250jLogger) {
+                  logger = (TN5250jLogger) object;
+               }
+            }
+            catch (Exception  ex) { ; }
+         } else {
+        	 if (log4j) {
+        		 logger = new Log4jLogger();
+        	 } else {
+        		 // take the default logger.
+        		 logger = new ConsoleLogger();
+        	 }
+        	 logger.initialize(clazzName);
+        	 logger.setLevel(level);
+        	 _loggers.put(clazzName, logger);
+         }
+      }
+
+      return logger;
+   }
+
+   public static boolean isLog4j() {
+   		return log4j;
+   }
+
+   public static void setLogLevels(int newLevel) {
+
+      if (level != newLevel) {
+         level = newLevel;
+         TN5250jLogger logger = null;
+         Set<String> loggerSet = _loggers.keySet();
+         Iterator<String> loggerIterator = loggerSet.iterator();
+         while (loggerIterator.hasNext()) {
+            logger = _loggers.get(loggerIterator.next());
+            logger.setLevel(newLevel);
+         }
+      }
+
+   }
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/tn5250j/tools/logging/TN5250jLogger.java	Thu May 22 12:38:09 2014 -0700
@@ -0,0 +1,133 @@
+/*
+ * @(#)TN5250jLogger.java
+ * @author  Kenneth J. Pouncey
+ *
+ * Copyright:    Copyright (c) 2001, 2002, 2003
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this software; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ *
+ */
+package org.tn5250j.tools.logging;
+
+/**
+ * An interface defining generic loggers.
+ */
+public interface TN5250jLogger {
+
+	// debug levels - The levels work from lower to higher. The lower levels
+	// will be activated by turning on a higher level
+	public static final int DEBUG = 1;	// most verbose
+	public static final int INFO  = 2;
+	public static final int WARN  = 4;  // medium verbose, should be choosen for deployment 
+	public static final int ERROR = 8;
+	public static final int FATAL = 16;
+	public static final int OFF   = 32;  // most silence
+
+	/**
+	 * @param clazz
+	 */
+	abstract public void initialize(final String clazz);
+
+	/**
+	 * @param message
+	 */
+	abstract public void debug(Object message);
+
+	/**
+	 * @param message
+	 * @param throwable
+	 */
+	abstract public void debug(Object message, Throwable throwable);
+
+	abstract public void info(Object message);
+
+	/**
+	 * @param message
+	 * @param throwable
+	 */
+	abstract public void info(Object message, Throwable throwable);
+
+	/**
+	 * @param message
+	 */
+	abstract public void warn(Object message);
+
+	/**
+	 * @param message
+	 * @param throwable
+	 */
+	abstract public void warn(Object message, Throwable throwable);
+
+	/**
+	 * @param message
+	 */
+	abstract public void error(Object message);
+
+	/**
+	 * @param message
+	 * @param throwable
+	 */
+	abstract public void error(Object message, Throwable throwable);
+
+	/**
+	 * @param message
+	 */
+	abstract public void fatal(Object message);
+
+	/**
+	 * @param message
+	 * @param throwable
+	 */
+	abstract public void fatal(Object message, Throwable throwable);
+
+	/**
+	 * @return
+	 */
+	abstract public boolean isDebugEnabled();
+
+	/**
+	 * @return
+	 */
+	abstract public boolean isInfoEnabled();
+
+	/**
+	 * @return
+	 */
+	abstract public boolean isWarnEnabled();
+
+	/**
+	 * @return
+	 */
+	abstract public boolean isErrorEnabled();
+
+	/**
+	 * @return
+	 */
+	abstract public boolean isFatalEnabled();
+
+	/**
+	 * Sets a new log level.
+	 * @param newLevel
+	 * @throws IllegalArgumentException If the new level is not allowed
+	 */
+	abstract public void setLevel(int newLevel);
+
+	/**
+	 * @return The current log level.
+	 */
+	abstract public int getLevel();
+
+}
\ No newline at end of file