- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    12
- 
        b20
- 
        generic
- 
        windows
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8275379 | 17.0.2 | Naoto Sato | P3 | Resolved | Fixed | b03 | 
                    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 inJDK-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
The `file.encoding` system property should be set to sprops->sun_jnu_encoding for platforms except MacOS but a regression introduced in
#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
- backported by
- 
                    JDK-8275379 file.encoding system property has an incorrect value on Windows -           
- Resolved
 
-         
- csr for
- 
                    JDK-8275309 file.encoding system property has an incorrect value on Windows -           
- Closed
 
-         
- relates to
- 
                    JDK-8352917 Incorrect native.encoding on Windows -           
- Closed
 
-         
- 
                    JDK-4947890 Minimize JNI upcalls in system-properties initialization -           
- Resolved
 
-         
- links to
- 
                     Commit
        openjdk/jdk17u/031c033f Commit
        openjdk/jdk17u/031c033f
- 
                     Commit
        openjdk/jdk/ad9e234f Commit
        openjdk/jdk/ad9e234f
- 
                     Review
        openjdk/jdk17u/213 Review
        openjdk/jdk17u/213
- 
                     Review
        openjdk/jdk/5953 Review
        openjdk/jdk/5953
             (3 links to)