Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8187041 JEP 400: UTF-8 by Default
  3. JDK-8271433

Release Note: JEP 400: UTF-8 by Default

XMLWordPrintable

      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

            naoto Naoto Sato
            naoto Naoto Sato
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: