Use console charset for reading/writing to stdin/out

This commit is contained in:
AsamK 2022-05-26 14:49:16 +02:00
parent 425e451237
commit e03c48e0ae
4 changed files with 9 additions and 5 deletions

View file

@ -48,7 +48,8 @@ public class JsonRpcDispatcherCommand implements LocalCommand {
m.setIgnoreAttachments(ignoreAttachments);
final var jsonOutputWriter = (JsonWriter) outputWriter;
final Supplier<String> lineSupplier = IOUtils.getLineSupplier(new InputStreamReader(System.in));
final Supplier<String> lineSupplier = IOUtils.getLineSupplier(new InputStreamReader(System.in,
IOUtils.getConsoleCharset()));
final var handler = new SignalJsonRpcDispatcherHandler(jsonOutputWriter, lineSupplier, false);
handler.handleConnection(m);