RFR: JDK-8233829: Non-ASCII module name cannot be handled under non-UTF8 environment

Toshio 5 Nakamura TOSHIONA at jp.ibm.com
Thu Apr 16 12:39:01 UTC 2020


Hi all,

Could you review this fix? Also, I'd like to ask a sponsor of the fix,
since
I'm not a committer.

Issue: https://bugs.openjdk.java.net/browse/JDK-8233829
Webrev: http://cr.openjdk.java.net/~tnakamura/8233829/webrev.00/

If module name is in non-ASCII and environment is in non-UTF8,
javac's "--add-modules" option cannot find the module.

com.sun.tools.javac.jvm.ModuleNameReader.utf8Mapper uses String(byte[],
int, int).
In problematic case, the String was generated by default encoding which
wasn't UTF8.
For example, Japanese Windows uses MS932 (Shift_JIS) encoding.
The byte[] in utf8Mapper method is always decoded by UTF-8.

Tier1 tests on Linux and Windows passed.

Best Regards,
Toshio Nakamura
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/compiler-dev/attachments/20200416/53052554/attachment.htm>


More information about the compiler-dev mailing list