--- old/make/data/charsetmapping/IBM970.c2b 2018-11-09 21:53:30.111699276 +0900 +++ new/make/data/charsetmapping/IBM970.c2b 2018-11-09 21:53:29.721686718 +0900 @@ -5,14 +5,3 @@ A2A6 FF5E A2C1 2299 A3DC 20A9 -# -# see .map file for the info regarding following 3 entries -# -a1aa 6950 -a1a9 84f1 -a1ad cf7f - - - - - --- old/make/data/charsetmapping/IBM970.map 2018-11-09 21:53:30.651716664 +0900 +++ new/make/data/charsetmapping/IBM970.map 2018-11-09 21:53:30.281704750 +0900 @@ -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 @@ A2BE 2665 A2BF 2667 A2C0 2663 +A2C1 25C9 A2C2 25C8 A2C3 25A3 A2C4 25D0 --- old/test/jdk/sun/nio/cs/TestIBMBugs.java 2018-11-09 21:53:31.421741457 +0900 +++ new/test/jdk/sun/nio/cs/TestIBMBugs.java 2018-11-09 21:53:30.971726967 +0900 @@ -174,6 +174,19 @@ } } + 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 @@ bug6371431(); bug6569191(); bug8202329(); + bug8213618(); } }