use the old charset.forName instead of standart to avoid JDK level set

This commit is contained in:
Lion
2023-10-13 10:49:43 +08:00
parent 86553fba20
commit aa834af535
@@ -147,8 +147,9 @@ public class SearchTest {
Searcher searcher = createSearcher(dbPath, cachePolicy);
long count = 0, costs = 0, tStart = System.nanoTime();
String line;
final Charset charset = Charset.forName("utf-8");
final FileInputStream fis = new FileInputStream(srcPath);
final BufferedReader reader = new BufferedReader(new InputStreamReader(fis, StandardCharsets.UTF_8));
final BufferedReader reader = new BufferedReader(new InputStreamReader(fis, charset));
while ((line = reader.readLine()) != null) {
String l = line.trim();
String[] ps = l.split("\\|", 3);