RFR JDK-8186801: Add regression test to test mapping based charsets (generated at build time)
Xueming Shen
xueming.shen at oracle.com
Wed Aug 30 16:12:54 UTC 2017
ping :-)
On 8/27/17, 11:00 PM, Xueming Shen wrote:
> Hi,
>
> Please help codereview the changes for JDK-8186801 and JDK-8186803
>
> issue: https://bugs.openjdk.java.net/browse/JDK-8186801
> https://bugs.openjdk.java.net/browse/JDK-8186803
> webrev: http://cr.openjdk.java.net/~sherman/8186801/webrev
>
> Notes:
>
> JDK-8186801:
> 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 verify the
> 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 closed
> repo to open repo sun.nio.cs.TestCharsetMapping.java.
>
> The newly added test verifies those "gensrc" charsets against the
> mappings in
> 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.
>
> 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 newline
> 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
> charsets.
>
> 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
> tables for
> IBM0114[0-9])
>
> Thanks
> Sherman
>
More information about the nio-dev
mailing list