From 3740a9b45fb99e3bc1105758e1f4f4f1a8298d19 Mon Sep 17 00:00:00 2001 From: ChomeNS <95471003+ChomeNS@users.noreply.github.com> Date: Tue, 29 Oct 2024 19:28:15 +0700 Subject: [PATCH] HOTFIX FIX --- .../me/chayapak1/chomens_bot/util/FileLoggerUtilities.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/chayapak1/chomens_bot/util/FileLoggerUtilities.java b/src/main/java/me/chayapak1/chomens_bot/util/FileLoggerUtilities.java index 3c0c75b..97bd5b4 100644 --- a/src/main/java/me/chayapak1/chomens_bot/util/FileLoggerUtilities.java +++ b/src/main/java/me/chayapak1/chomens_bot/util/FileLoggerUtilities.java @@ -84,14 +84,14 @@ public class FileLoggerUtilities { if (!Files.exists(logPath)) Files.createFile(logPath); - logWriter = Files.newBufferedWriter(logPath, StandardOpenOption.TRUNCATE_EXISTING); + logWriter = Files.newBufferedWriter(logPath, StandardCharsets.UTF_8, StandardOpenOption.TRUNCATE_EXISTING); logWriter.write(currentLogDate.toString() + '\n'); logWriter.flush(); } public static void openLogFile() throws IOException { currentLogDate = LocalDate.parse(getLogDate(logPath)); - logWriter = Files.newBufferedWriter(logPath, StandardCharsets.ISO_8859_1, StandardOpenOption.APPEND); + logWriter = Files.newBufferedWriter(logPath, StandardCharsets.UTF_8, StandardOpenOption.APPEND); } public static void compressLogFile() throws IOException {