From 0e398c2dcaa4096f10036ddfcb3c2414b5a434c0 Mon Sep 17 00:00:00 2001 From: Andre601 <11576465+Andre601@users.noreply.github.com> Date: Sun, 7 Aug 2022 02:38:26 +0200 Subject: [PATCH] Use UTF-8 charset --- .../oneversionremake/core/proxy/ProtocolVersionResolver.java | 3 ++- pom.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/andre601/oneversionremake/core/proxy/ProtocolVersionResolver.java b/core/src/main/java/com/andre601/oneversionremake/core/proxy/ProtocolVersionResolver.java index 958f080..405def6 100644 --- a/core/src/main/java/com/andre601/oneversionremake/core/proxy/ProtocolVersionResolver.java +++ b/core/src/main/java/com/andre601/oneversionremake/core/proxy/ProtocolVersionResolver.java @@ -28,6 +28,7 @@ import okhttp3.ResponseBody; import java.io.*; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; @@ -116,7 +117,7 @@ private VersionsFile copyAndUpdate(String json){ return null; try{ - FileWriter fileWriter = new FileWriter(file.toFile(), false); + FileWriter fileWriter = new FileWriter(file.toFile(), StandardCharsets.UTF_8, false); BufferedWriter writer = new BufferedWriter(fileWriter); writer.write(json); diff --git a/pom.xml b/pom.xml index 8bad1be..7e41250 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 3.11.2 + 3.11.3 Only allow specific client versions on your Network. 11