diff --git a/make/data/charsetmapping/IBM970.c2b b/make/data/charsetmapping/IBM970.c2b index 53518704326..8f3682414d9 100644 --- a/make/data/charsetmapping/IBM970.c2b +++ b/make/data/charsetmapping/IBM970.c2b @@ -5,14 +5,3 @@ A1AD 223C A2A6 FF5E A2C1 2299 A3DC 20A9 -# -# see .map file for the info regarding following 3 entries -# -a1aa 6950 -a1a9 84f1 -a1ad cf7f - - - - - diff --git a/make/data/charsetmapping/IBM970.map b/make/data/charsetmapping/IBM970.map index 148ac1a89a3..90d1b8cb45f 100644 --- a/make/data/charsetmapping/IBM970.map +++ b/make/data/charsetmapping/IBM970.map @@ -1,15 +1,6 @@ # # source: Cp970.b2c, which is identical(?) to 03CA34B0.TPMAP100 # -# Warning: -# following 3 c->b only entries exist in the "old" implementation, -# they don't appear existing in any of of the cdc 970 tables. Added -# them into c2b for "compatibility -# 6950 -> a1aa 2014 -# 84f1 -> a1a9 2010 -# cf7f -> a1ad 301c -# -# 00 0000 01 0001 02 0002 @@ -294,6 +285,7 @@ A2BD 2661 A2BE 2665 A2BF 2667 A2C0 2663 +A2C1 25C9 A2C2 25C8 A2C3 25A3 A2C4 25D0 diff --git a/test/jdk/sun/nio/cs/TestIBMBugs.java b/test/jdk/sun/nio/cs/TestIBMBugs.java index 83706397471..27683879499 100644 --- a/test/jdk/sun/nio/cs/TestIBMBugs.java +++ b/test/jdk/sun/nio/cs/TestIBMBugs.java @@ -174,6 +174,19 @@ public class TestIBMBugs { } } + private static void bug8213618 () throws Exception { + String cs = "x-IBM970"; + byte[] ba = new byte[]{(byte)0xA2,(byte)0xC1}; + String s = "\u25C9"; + if (!(new String(ba, cs)).equals(s)) + throw new Exception("Cp970 failed"); + if (!Arrays.equals(ba, s.getBytes(cs))) + throw new Exception("Cp970 failed"); + ba = new byte[]{0x3f,0x3f,0x3f}; + if (!Arrays.equals(ba, "\u6950\u84f1\ucf7f".getBytes(cs))) + throw new Exception("Cp970 failed"); + } + private static void bug8202329() throws Exception { String original = "\\\u007E\u00A5\u203E"; // [backslash][tilde][yen][overscore] byte[] expectedBytes; // bytes after conversion @@ -232,5 +245,6 @@ public class TestIBMBugs { bug6371431(); bug6569191(); bug8202329(); + bug8213618(); } }