JDK-8352916 : `stdout/err.encoding` in non-interactive environment
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.io
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2025-03-25
  • Updated: 2025-03-31
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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
Currently `stdout/err.encoding` system properties are derived from host specific way, i.e., the value from nl_langinfo() on Unix and GetConsoleOutputCP() on Windows is used if the Java runtime is connected to a terminal. If the runtime is not connected to a terminal, e.g. redirecting to a file or pipe, it falls back to `native.encoding`. In those cases, using the default charset (`file.encoding`) would be desirable, considering all other IO apis now use the default charset.