From 741aa96d8e003e9fd0a6c1d6c8901016469221e4 Mon Sep 17 00:00:00 2001 From: "Rodolfo M. Raya" Date: Sun, 11 Apr 2021 08:42:16 -0300 Subject: [PATCH] Forced reading UTF-8 on Windows --- src/com/maxprograms/swordfish/tm/RemoteDatabase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/maxprograms/swordfish/tm/RemoteDatabase.java b/src/com/maxprograms/swordfish/tm/RemoteDatabase.java index a5a0a8d..2d713d9 100644 --- a/src/com/maxprograms/swordfish/tm/RemoteDatabase.java +++ b/src/com/maxprograms/swordfish/tm/RemoteDatabase.java @@ -89,7 +89,7 @@ private JSONObject postMessage(String servlet, JSONObject json) throws IOExcepti StringBuilder sb = new StringBuilder(); try (InputStream stream = connection.getInputStream()) { - try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) { + try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream, StandardCharsets.UTF_8))) { String line; while ((line = reader.readLine()) != null) { sb.append(line);