指定读取行政区划文件编码
parent
045150163e
commit
af73442254
|
@ -15,6 +15,7 @@ import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,7 +55,7 @@ public class CivilCodeFileConf implements CommandLineRunner {
|
||||||
inputStream = Files.newInputStream(civilCodeFile.toPath());
|
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;
|
int index = -1;
|
||||||
String line;
|
String line;
|
||||||
while ((line = inputStreamReader.readLine()) != null) {
|
while ((line = inputStreamReader.readLine()) != null) {
|
||||||
|
|
Loading…
Reference in New Issue