5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk/*
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk *
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * This code is free software; you can redistribute it and/or modify it
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * under the terms of the GNU General Public License version 2 only, as
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * published by the Free Software Foundation.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk *
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * This code is distributed in the hope that it will be useful, but WITHOUT
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * version 2 for more details (a copy is included in the LICENSE file that
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * accompanied this code).
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk *
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * You should have received a copy of the GNU General Public License version
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk * 2 along with this work; if not, write to the Free Software Foundation,
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk *
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * or visit www.oracle.com if you need additional information or have any
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk * questions.
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk */
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk/* @test
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk @bug 4513767 4961027 6217210
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk @summary Checks canonical names match between old and (NIO) core charsets
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk */
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkimport java.io.InputStreamReader;
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkimport java.io.IOException;
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenkpublic class CheckHistoricalNames {
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk static int failed = 0;
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk public static void main (String[] args) throws Exception {
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ASCII");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1252");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ISO8859_1");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("UnicodeBigUnmarked");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("UnicodeLittle");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("UnicodeLittleUnmarked");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("UTF8");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("UTF-16");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("UnicodeBig", "UTF-16");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("US-ASCII", "ASCII");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("ISO-8859-1", "ISO8859_1");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("UTF-8", "UTF8");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("UTF-16BE", "UnicodeBigUnmarked");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("UTF-16LE", "UnicodeLittleUnmarked");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ISO8859_2");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ISO8859_4");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ISO8859_5");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ISO8859_7");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ISO8859_9");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ISO8859_13");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkHistoricalName("KOI8_R");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1250");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1251");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1253");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1254");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1257");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkMappedName("ISO-8859-2", "ISO8859_2");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("ISO-8859-4", "ISO8859_4");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("ISO-8859-5", "ISO8859_5");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("ISO-8859-7", "ISO8859_7");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("ISO-8859-9", "ISO8859_9");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkMappedName("ISO-8859-13", "ISO8859_13");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkMappedName("KOI8-R", "KOI8_R");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("windows-1250", "Cp1250");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("windows-1251","Cp1251");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("windows-1253", "Cp1253");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("windows-1254", "Cp1254");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("windows-1257", "Cp1257");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("EUC_CN");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("EUC_JP");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("EUC_JP_LINUX");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("EUC_KR");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("EUC_TW");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ISO2022CN");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ISO2022JP");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkHistoricalName("ISO2022KR");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkHistoricalName("ISO8859_3");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ISO8859_6");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("ISO8859_8");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1255");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1256");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1258");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MS936");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkHistoricalName("MS949");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MS950");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("TIS620");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("EUC-CN", "EUC_CN");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("EUC-JP", "EUC_JP");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("EUC-JP-LINUX", "EUC_JP_LINUX");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("EUC-TW", "EUC_TW");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("EUC-KR", "EUC_KR");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("ISO-2022-CN", "ISO2022CN");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("ISO-2022-JP", "ISO2022JP");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("ISO-2022-KR", "ISO2022KR");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("ISO-8859-3", "ISO8859_3");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("ISO-8859-6", "ISO8859_6");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkMappedName("ISO-8859-8", "ISO8859_8");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("windows-1255", "Cp1255");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("windows-1256", "Cp1256");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("windows-1258", "Cp1258");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("windows-936", "GBK");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("windows-949", "MS949");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkMappedName("windows-950", "MS950");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MS950-HKSCS", "MS950_HKSCS");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-PCK", "PCK");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("Shift_JIS", "SJIS");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-JISAutoDetect", "JISAutoDetect");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("TIS-620", "TIS620");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-Big5-Solaris", "Big5_Solaris");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp037");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1006");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1025");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1026");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1046");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1047");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1097");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1098");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1112");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1122");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1123");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1124");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1140");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1141");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1142");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1143");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1144");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1145");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1146");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1147");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1148");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1149");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1381");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp1383");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp273");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp277");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp278");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp280");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp284");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp285");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp297");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp33722");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp420");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp424");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp437");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp500");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp737");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp775");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp833");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp838");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp850");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp852");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp855");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp856");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp857");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp858");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp860");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp861");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp862");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp863");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp864");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp865");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp866");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp868");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp869");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp870");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp871");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp874");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkHistoricalName("Cp875");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp918");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp921");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp922");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkHistoricalName("Cp933");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp939");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp949");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp964");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("Cp970");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM037", "Cp037");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1006", "Cp1006");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1025", "Cp1025");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1026", "Cp1026");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-IBM1046", "Cp1046");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1047", "Cp1047");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1097", "Cp1097");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1098", "Cp1098");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1112", "Cp1112");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1122", "Cp1122");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1123", "Cp1123");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1124", "Cp1124");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM01140", "Cp1140");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM01141", "Cp1141");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM01142", "Cp1142");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM01143", "Cp1143");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM01144", "Cp1144");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM01145", "Cp1145");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM01146", "Cp1146");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM01147", "Cp1147");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkMappedName("IBM01148", "Cp1148");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM01149", "Cp1149");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1381", "Cp1381");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM1383", "Cp1383");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM273", "Cp273");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM277", "Cp277");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM278", "Cp278");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM280", "Cp280");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM284", "Cp284");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM285", "Cp285");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM297", "Cp297");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM33722", "Cp33722");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkMappedName("IBM420", "Cp420");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM424", "Cp424");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM437", "Cp437");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM500", "Cp500");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM737", "Cp737");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkMappedName("IBM775", "Cp775");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM838", "Cp838");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM850", "Cp850");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM852", "Cp852");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM855", "Cp855");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkMappedName("IBM856", "Cp856");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM857", "Cp857");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM00858", "Cp858");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM833", "Cp833");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM860", "Cp860");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM861", "Cp861");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM862", "Cp862");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM863", "Cp863");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM864", "Cp864");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM865", "Cp865");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM866", "Cp866");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM868", "Cp868");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM869", "Cp869");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM870", "Cp870");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM871", "Cp871");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM874", "Cp874");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkMappedName("IBM875", "Cp875");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM918", "Cp918");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM921", "Cp921");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM922", "Cp922");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-IBM930", "Cp930");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM933", "Cp933");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-IBM935", "Cp935");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-IBM937", "Cp937");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM939", "Cp939");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-IBM942", "Cp942");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-IBM942C", "Cp942C");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-IBM943", "Cp943");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-IBM943C", "Cp943C");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-IBM948", "Cp948");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM949", "Cp949");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-IBM949C", "Cp949C");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-IBM950", "Cp950");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM964", "Cp964");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("IBM970", "Cp970");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacArabic");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacCentralEurope");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacCroatian");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacCyrillic");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacDingbat");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacGreek");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacHebrew");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacIceland");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacRoman");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacRomania");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacSymbol");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacThai");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacTurkish");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkHistoricalName("MacUkraine");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacArabic", "MacArabic");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacCentralEurope", "MacCentralEurope");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacCroatian", "MacCroatian");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacCyrillic", "MacCyrillic");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacDingbat", "MacDingbat");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacGreek", "MacGreek");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacHebrew", "MacHebrew");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacIceland", "MacIceland");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacRoman", "MacRoman");
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk checkMappedName("x-MacRomania", "MacRomania");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacSymbol", "MacSymbol");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacThai", "MacThai");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacTurkish", "MacTurkish");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName("x-MacUkraine", "MacUkraine");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk if (failed != 0)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk throw new Exception("Test Failed: " + failed);
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk else
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk System.out.println("Test Passed!");
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk }
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk private static void checkHistoricalName(String name) throws Exception {
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk checkMappedName(name, name);
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk }
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk
dff2cc5646d4437ab9e0cb1dcb59da65462a5938jeff.schenk private static void checkMappedName(String alias, String canonical)
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk throws Exception {
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk InputStreamReader reader = new InputStreamReader(System.in, alias);
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk if (!reader.getEncoding().equals(canonical)) {
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk System.out.println("Failed canonical names : mismatch for " + alias
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk + " - expected " + canonical
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk + ", got " + reader.getEncoding());
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk failed++;
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk }
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk }
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk}
5b64d5d44892834ba97f003080f3467299b7c5c5jeff.schenk