From af7344225413729e2ccf8f3b83b68dc097fa5bcd Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: Mon, 9 Dec 2024 14:27:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8C=87=E5=AE=9A=E8=AF=BB=E5=8F=96=E8=A1=8C?= =?UTF-8?q?=E6=94=BF=E5=8C=BA=E5=88=92=E6=96=87=E4=BB=B6=E7=BC=96=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/genersoft/iot/vmp/conf/CivilCodeFileConf.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/conf/CivilCodeFileConf.java b/src/main/java/com/genersoft/iot/vmp/conf/CivilCodeFileConf.java index 878e01c5..28e68fb3 100644 --- a/src/main/java/com/genersoft/iot/vmp/conf/CivilCodeFileConf.java +++ b/src/main/java/com/genersoft/iot/vmp/conf/CivilCodeFileConf.java @@ -15,6 +15,7 @@ import java.io.BufferedReader; import java.io.File; import java.io.InputStream; import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; import java.nio.file.Files; /** @@ -54,7 +55,7 @@ public class CivilCodeFileConf implements CommandLineRunner { inputStream = Files.newInputStream(civilCodeFile.toPath()); } - BufferedReader inputStreamReader = new BufferedReader(new InputStreamReader(inputStream)); + BufferedReader inputStreamReader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8)); int index = -1; String line; while ((line = inputStreamReader.readLine()) != null) {