8213618: IBM970 charset has missing entry and remove unexpected entries

Reviewed-by: srl, martin
This commit is contained in:
Ichiroh Takiguchi 2018-12-02 11:09:46 -08:00
parent 320616a865
commit 98287928da
3 changed files with 15 additions and 20 deletions

View File

@ -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

View File

@ -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

View File

@ -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();
}
}