指定utf-8编码.

This commit is contained in:
许晓东
2023-05-19 15:35:44 +08:00
parent 6f093fbb27
commit 60fb02d6d4
3 changed files with 3 additions and 3 deletions

View File

@@ -82,7 +82,7 @@ public class SqlParse {
// List<String> lines = Files.readLines(file, Charset.forName("UTF-8"));
List<String> lines = new ArrayList<>();
try (InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(FILE)) {
try (InputStreamReader inputStreamReader = new InputStreamReader(inputStream)) {
try (InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "UTF-8")) {
try (BufferedReader reader = new BufferedReader(inputStreamReader)) {
String line;
while ((line = reader.readLine()) != null) {