-
Enhancement
-
Resolution: Fixed
-
P3
-
18
-
b25
-
generic
-
generic
This issue was raised during the conversations in the following PR:
https://github.com/openjdk/jdk/pull/5771
The constructors that take `OutputStream` w/o explicit charset defaults to use the `Charset.defaultCharset()` encoding. This is causing an issue if the OutputStream to wrap is a PrintStream, which holds its own charset, and it will be ignored. If those charsets differ, apps would end up specifying explicit charset on creating the PrintWriter, as in the said PR.
This is especially problematic when PrintWriter wraps System.out/err, because with the JEP400, the default charset is now UTF-8 while standard I/O remains in `native.encoding`.
https://github.com/openjdk/jdk/pull/5771
The constructors that take `OutputStream` w/o explicit charset defaults to use the `Charset.defaultCharset()` encoding. This is causing an issue if the OutputStream to wrap is a PrintStream, which holds its own charset, and it will be ignored. If those charsets differ, apps would end up specifying explicit charset on creating the PrintWriter, as in the said PR.
This is especially problematic when PrintWriter wraps System.out/err, because with the JEP400, the default charset is now UTF-8 while standard I/O remains in `native.encoding`.
- csr for
-
JDK-8277078 Default charset for PrintWriter that wraps PrintStream
- Closed
- duplicates
-
JDK-8274544 Langtools command's usage were garbled on Japanese Windows
- Closed
-
JDK-8277046 Incorrect default encoding for System.getLogger(..).log(..) console output
- Closed
- relates to
-
JDK-8274544 Langtools command's usage were garbled on Japanese Windows
- Closed
-
JDK-8277046 Incorrect default encoding for System.getLogger(..).log(..) console output
- Closed
-
JDK-8260265 UTF-8 by Default
- Resolved
(1 relates to, 2 links to)