Console encoding only when interactive

This commit is contained in:
pyxide
2017-01-09 18:07:17 +01:00
committed by Juan Martín Sotuyo Dodero
parent d7c503bee4
commit 43a38d3144

View File

@ -78,7 +78,6 @@ public class Formatter {
if (toConsole) {
s = getConsoleEncoding();
if (null == s) {
// highly unlikely.
s = System.getProperty("file.encoding");
}
}
@ -215,9 +214,10 @@ public class Formatter {
} catch (IllegalAccessException e) {
// fall-through
}
}
return getNativeConsoleEncoding();
}
return null;
}
private static String getNativeConsoleEncoding() {
try {