src/java.base/share/classes/java/io/Console.java

Print this page

        

*** 562,572 **** try { cs = Charset.forName(csname); } catch (Exception x) {} } if (cs == null) ! cs = Charset.defaultCharset(); out = StreamEncoder.forOutputStreamWriter( new FileOutputStream(FileDescriptor.out), writeLock, cs); pw = new PrintWriter(out, true) { public void close() {} }; --- 562,572 ---- try { cs = Charset.forName(csname); } catch (Exception x) {} } if (cs == null) ! cs = Boolean.getBoolean("windows.UnicodeConsole") ? Charset.defaultUnicodeCharset() : Charset.defaultCharset(); out = StreamEncoder.forOutputStreamWriter( new FileOutputStream(FileDescriptor.out), writeLock, cs); pw = new PrintWriter(out, true) { public void close() {} };