JDK-8271433 : Release Note: JEP 400: UTF-8 by Default
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.nio.charsets
  • Affected Version: 18
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • OS: generic
  • CPU: generic
  • Submitted: 2021-07-28
  • Updated: 2021-11-15
  • Resolved: 2021-11-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 18
18Resolved
Description
Starting with JDK 18,  UTF-8 is the default charset for the Java SE APIs. APIs that depend on the default charset now behave consistently across all JDK implementations and independently of the user’s operating system, locale, and configuration. Specifically, `java.nio.charset.Charset#defaultCharset()` now returns `UTF-8` charset by default. The `file.encoding` system property is now a part of the implementation specification, which may accept `UTF-8` or `COMPAT`.  The latter is a new property value that instructs the runtime to behave as previous releases. This change is significant to users who call APIs that depend on the default charset. They can try whether they'd be affected or not, by specifying `-Dfile.encoding=UTF-8` as the command line option with the existing Java runtime environment.
Refer to the JEP for more detail: https://openjdk.java.net/jeps/400