Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8275145

file.encoding system property has an incorrect value on Windows

    XMLWordPrintable

Details

    • b20
    • generic
    • windows

    Backports

      Description

        https://mail.openjdk.java.net/pipermail/core-libs-dev/2021-October/082387.html

        The `file.encoding` system property should be set to sprops->sun_jnu_encoding for platforms except MacOS but a regression introduced in JDK-4947890 that set its value to sprops->encoding instead.

        #ifdef MACOSX
                /*
                 * Since sun_jnu_encoding is now hard-coded to UTF-8 on Mac, we don't
                 * want to use it to overwrite file.encoding
                 */
                PUTPROP(props, "file.encoding", sprops->encoding);
        #else
                PUTPROP(props, "file.encoding", sprops->sun_jnu_encoding);
        #endif

        Attachments

          Issue Links

            Activity

              People

                naoto Naoto Sato
                mchung Mandy Chung
                Votes:
                0 Vote for this issue
                Watchers:
                9 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: