Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8300916 Re-examine the initialization of JNU Charset in StaticProperty
  3. JDK-8301891

Release Note: Clarification of the Default Charset Initialization with `file.encoding`

    XMLWordPrintable

Details

    Description

      If the system property `file.encoding` is set on the command line to the name of a charset that is not in the `java.base` module, then the JDK will ignore it and default to UTF-8. In JDK 17 and older, the JDK would attempt to locate the charset, even though it was never supported or documented to change the value of this system property in these releases. Since JDK 18, it is possible to set the system property on the command line to the value `UTF-8` (the default) or `COMPAT`. Setting it to any other value is not defined.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: