Fix stdout encoding

This commit is contained in:
Karlatemp 2020-09-27 13:01:16 +08:00
parent 5ef8cec447
commit 0d21ee4c1b
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8

View File

@ -172,14 +172,18 @@ internal fun overrideSTD() {
PrintStream( PrintStream(
BufferedOutputStream( BufferedOutputStream(
logger = DefaultLogger("stdout").run { ({ line: String? -> info(line) }) } logger = DefaultLogger("stdout").run { ({ line: String? -> info(line) }) }
) ),
false,
Charsets.UTF_8
) )
) )
System.setErr( System.setErr(
PrintStream( PrintStream(
BufferedOutputStream( BufferedOutputStream(
logger = DefaultLogger("stderr").run { ({ line: String? -> warning(line) }) } logger = DefaultLogger("stderr").run { ({ line: String? -> warning(line) }) }
) ),
false,
Charsets.UTF_8
) )
) )
} }