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

Ichiroh Takiguchi itakiguchi at openjdk.java.net
Sat Nov 6 17:02:32 UTC 2021


On Sat, 6 Nov 2021 16:20:41 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> @naotoj 
>> I'm not reviewer.
>> Could you explain more detail, why JEP-400 needs to touch sun.jnu.encoding system property's fallback ?
>
>> Could you explain more detail, why JEP-400 needs to touch sun.jnu.encoding system property's fallback ?
> 
> This is about running on unusual configurations where the native encoding (native.encoding and sun.jnu.encoding) doesn't name a charset in java.base. There has been several reports of NPE in such cases. Now that the default charset is UTF-8 it means there is a sane fallback so the VM can startup.

Thanks @AlanBateman .
In my understanding, sun.jnu.encoding property may be related file system access.
Java may not be access to appropriate file.
I mean if the file name has malformed character, it may be changed to "?".
In this case, unexpected file access may be happened.
8-bit pass-through may be better...

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

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


More information about the core-libs-dev mailing list