RFR JDK-8186801: Add regression test to test mapping based charsets (generated at build time)
xueming.shen at oracle.com
Mon Aug 28 06:00:00 UTC 2017
Please help codereview the changes for JDK-8186801 and JDK-8186803
During the discussion of adding ISO-8859-16 charset into jdk10 it
appears it is
really inconvenient not having the appropriate regression/unit tests to
correctness of charset mapping in open repo. The proposed change here is to
migrate one of the corresponding test (sun.nio.cs.TestCoder.java) in our
repo to open repo sun.nio.cs.TestCharsetMapping.java.
The newly added test verifies those "gensrc" charsets against the
make/data/charsetmapping for the charset name, aliases and the correctness
of the mappings, which triggers couple minor changes
(1) x-SJIS_0213/x-MS932_0213, wrong charset name for aliases lookup.
(2) euc-jp-open, inconsistent charset name
(3) change mapping table file name from euc_tw to EUC_TW
(4) migrated couple mapping tables from closed repo to open repo to test
those "template" based gensrc charsets (we don't have mapping tables
in repo now)
(5) and inconsistent handling of linefeed for charset cp1140-1149, which
is recorded in JDK-8186803.
All JDK's EBCDIC charsets, except Cp1140-1149, map the line-feed
\u000A character to EBCDIC 0x15. The related mappings are as
0x25 (LF) => U+000A
0x15(NL) <=> U+000A
0x15(NL) <= U+0085
Cp1140-1149 however maps the U+000A.
As suggested in JDK-7016785, there are/were two standards to handle the
in z/OS ( LF/0x25 CDRA or NL/0x15). From JDK1.4, IBM idk has moved on to map
\u000a to 0x15 as the default, which matches the behavior of most our ebcdic
This rfe is to update the Cp114[0-9] to also map \u000A to ebcdic 0x15 to be
consistent with other ebcdic charsets (to add non-roundtrip mapping
More information about the core-libs-dev