提交 2789fd0d authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Do not use CP1252

上级 77d5024d
......@@ -166,7 +166,7 @@ public class Profiler implements Runnable {
}
continue;
}
try (Reader reader = new InputStreamReader(new FileInputStream(arg), "CP1252")) {
try (Reader reader = new InputStreamReader(new FileInputStream(arg))) {
LineNumberReader r = new LineNumberReader(reader);
while (true) {
String line = r.readLine();
......@@ -177,7 +177,7 @@ public class Profiler implements Runnable {
}
}
}
try (Reader reader = new InputStreamReader(new FileInputStream(arg), "CP1252")) {
try (Reader reader = new InputStreamReader(new FileInputStream(arg))) {
LineNumberReader r = new LineNumberReader(reader);
processList(readStackTrace(r));
}
......
......@@ -8,6 +8,7 @@ package org.h2.test.scripts;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
import java.nio.charset.StandardCharsets;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
......@@ -46,8 +47,7 @@ public class TestScriptSimple extends TestDb {
reconnect();
String inFile = "org/h2/test/scripts/testSimple.in.txt";
InputStream is = getClass().getClassLoader().getResourceAsStream(inFile);
LineNumberReader lineReader = new LineNumberReader(
new InputStreamReader(is, "Cp1252"));
LineNumberReader lineReader = new LineNumberReader(new InputStreamReader(is, StandardCharsets.UTF_8));
try (ScriptReader reader = new ScriptReader(lineReader)) {
while (true) {
String sql = reader.readStatement();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论