RFR: JDK-8233829: javac cannot find non-ASCII module name under non-UTF8 environment

Toshio 5 Nakamura TOSHIONA at jp.ibm.com
Thu May 14 02:11:57 UTC 2020


Hi,

Can anyone please review this fix?
Revised the patch simpler. In my understanding, the encoding is modified
UTF-8 instead of standard UTF-8 in this case. So, the fix uses Convert
utility class.

Webrev.01: http://cr.openjdk.java.net/~tnakamura/8233829/webrev.01/

Best regards,
Toshio Nakamura

> From: Toshio 5 Nakamura/Japan/IBM
> To: compiler-dev at openjdk.java.net
> Date: 2020/04/16 21:39
> Subject: RFR: JDK-8233829: Non-ASCII module name cannot be handled
> under non-UTF8 environment
>
> 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/20200514/b24315ce/attachment.htm>


More information about the compiler-dev mailing list