RFR: 8275007: Java fails to start with null charset if LC_ALL is set to certain locales [v7]

Alan Bateman alanb at openjdk.java.net
Wed Nov 17 13:05:43 UTC 2021


On Mon, 15 Nov 2021 17:32:04 GMT, Naoto Sato <naoto at openjdk.org> 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:
> 
>   Replace jnuEncoding in jni_util.c with UTF-8, if platform encoding is not supported

src/java.base/share/classes/sun/nio/fs/Util.java line 43:

> 41:         Charset.forName(
> 42:             GetPropertyAction.privilegedGetProperty("sun.jnu.encoding"),
> 43:             sun.nio.cs.UTF_8.INSTANCE);

Startup will ensure that sun.jnu.encoding has a value that is a supported encoding so I assume the the fallback in sun.nio.ch.Util is no longer needed.

-------------

PR: https://git.openjdk.java.net/jdk/pull/6282


More information about the core-libs-dev mailing list