Allowing apps to force sun.jnu.encoding = "UTF-8" on Windows

Naoto Sato naoto.sato at oracle.com
Mon Nov 4 19:46:21 UTC 2024


Hi Fabian,

On 11/4/24 1:38 AM, Fabian Meumertzheim wrote:
> 
> Would contributions in this area be welcome? If it is possible to get
> to a state where this assumption does hold via incremental, behavior
> preserving changes to the native Windows parts of the Java runtime,
> that would potentially allow the codepage to be made configurable from
> the java.exe command line in the future.

I am afraid that the risk that would be involved in configuring 
sun.jnu.encoding exceeds the benefit it would bring, as the encoding is 
so baked in the basis of the Windows Java runtime. Since Microsoft 
itself now recommends users choose UTF-8 as the ANSI code page (over 
changing apps to use -W APIs)[1], I think we would want to wait for that 
glorious day.

Naoto

[1] 
https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page#-a-vs--w-apis


More information about the core-libs-dev mailing list