指定读取行政区划文件编码

dev/数据库统合
648540858 2024-12-09 14:27:54 +08:00
parent 045150163e
commit af73442254
1 changed files with 2 additions and 1 deletions

View File

@ -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) {