2362N/A * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. 1245N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1245N/A * This code is free software; you can redistribute it and/or modify it 1245N/A * under the terms of the GNU General Public License version 2 only, as 1245N/A * published by the Free Software Foundation. 1245N/A * This code is distributed in the hope that it will be useful, but WITHOUT 1245N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1245N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1245N/A * version 2 for more details (a copy is included in the LICENSE file that 1245N/A * You should have received a copy of the GNU General Public License version 1245N/A * 2 along with this work; if not, write to the Free Software Foundation, 1245N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 2362N/A * or visit www.oracle.com if you need additional information or have any 1245N/A * @summary Test IBM DB charsets 1306N/A * @build IBM930_OLD IBM933_OLD IBM935_OLD IBM937_OLD IBM939_OLD IBM942_OLD IBM943_OLD IBM948_OLD IBM949_OLD IBM950_OLD IBM970_OLD IBM942C_OLD IBM943C_OLD IBM949C_OLD IBM1381_OLD IBM1383_OLD EUC_CN_OLD EUC_KR_OLD GBK_OLD Johab_OLD MS932_OLD MS936_OLD MS949_OLD MS950_OLD 1245N/A for (
char c =
0; c <
0xffff; c++) {
1306N/A // we know 970 has bogus nnnn -> a2c1 -> 2299 1245N/A for (
int b =
0; b <
0x100; b++) {
1306N/A // only prints we are NOT expected. above two are known issue 1245N/A //if (!sOld.equals(sNew)) { 1245N/A continue;
// known issude in old implementation 1245N/A /* The first byte is the length of malformed bytes 1245N/A {5, (byte)0xF8, (byte)0x80, (byte)0x80, (byte)0x9F, (byte)0x80, (byte)0xC0 }, 1245N/A //7f, a1a1, 8ea2a1a1, 8ea3a1a1, 8ea7a1a1 1245N/A //inpos, inLen, outPos, outLen, inPosEP, outposEP, under(0)/over(1) 1245N/A {
1,
0x26,
0x0f,
0x27},
// in SBSC, no SI 1245N/A {
1,
0x0e,
0x41,
0x41,
0xe},
// in DBSC, no SO 1245N/A {
2,
0x0e,
0x40,
0x41,
0xe},
// illegal DB 1245N/A {
1,
0x26, (
byte)
0x8f,
0x27},
// SS2 1245N/A {
1, (
byte)
0xa1, (
byte)
0xa1, (
byte)
0x8e,
0x51},
// SS3