With JEP 400, the default charset becomes UTF-8 for all OS and in all locales.
It is possible to use the system variable 𝒇𝒊𝒍𝒆.𝒆𝒏𝒄𝒐𝒅𝒊𝒏𝒈 to configure a different default charset
or to configure it to 𝑪𝑶𝑴𝑷𝑨𝑻 to revert to the previous behavior.
It allows to:
👉 Make Java programs more predictable and portable when their code relies on the default charset.
👉 Clarify where the standard Java API uses the default charset.
👉 Standardize on UTF-8 throughout the standard Java APIs, except for console I/O.