On Sun, 14 Nov 2021 02:23:03 GMT, Naoto Sato <[email protected]> wrote:
>> Please review the subject fix. In light of JEP400, Java runtime can/should
>> start in UTF-8 charset if the underlying native encoding is not supported.
>
> Naoto Sato has updated the pull request incrementally with one additional
> commit since the last revision:
>
> Fixed indentation
src/java.base/share/classes/java/lang/System.java line 2123:
> 2121: var jnuEncoding = props.getProperty("sun.jnu.encoding");
> 2122: if (jnuEncoding == null || !Charset.isSupported(jnuEncoding)) {
> 2123: notSupportedJnuEncoding = jnuEncoding == null ? "null" :
> jnuEncoding;
I think we are nearly there. When setting notSupportedJnuEncoding then we also
need to set the sun.jnu.encoding property to "UTF-8", setting it in initPhase3
is too late because the file system may be used using initPhase2.
-------------
PR: https://git.openjdk.java.net/jdk/pull/6282