From a631cabfcdd00899303ad44dcd888c211d08ecf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikl=C3=B3s=20T=C3=B3th?= <tothmiklostibor@gmail.com> Date: Mon, 19 Apr 2021 11:23:14 +0200 Subject: [PATCH] i hate windows so much --- src/main/java/tester/Main.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/tester/Main.java b/src/main/java/tester/Main.java index 0a4a661..28d00c6 100644 --- a/src/main/java/tester/Main.java +++ b/src/main/java/tester/Main.java @@ -28,7 +28,7 @@ public class Main { Gson gson = new Gson(); - TestCase test = gson.fromJson(new FileReader(testName), TestCase.class); + TestCase test = gson.fromJson(new InputStreamReader(new FileInputStream(testName), StandardCharsets.UTF_8), TestCase.class); test.input = yeetEmpty(test.input); test.output = yeetEmpty(test.output); @@ -36,7 +36,7 @@ public class Main { Process proc; try { - proc = Runtime.getRuntime().exec(String.format("java -jar %s --testing", jarfile)); + proc = Runtime.getRuntime().exec(String.format("java -Dfile.encoding=UTF-8 -jar %s --testing", jarfile)); } catch (Exception e) { System.out.print("❌ "); System.out.printf("Nem sikerület elindítani a folyamatot, kérlek ellenőrizd, hogy tesztelendő program tényleg itt van-e: \"%s\"\n", jarfile); -- GitLab