mirror of https://github.com/apache/lucene.git
LUCENE-4194: just a taste of what I mean by encoding-sensitive.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1357565 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
83aa0d66a1
commit
64407ad2ff
|
@ -80,7 +80,8 @@ public class Config {
|
||||||
}
|
}
|
||||||
// read props from string
|
// read props from string
|
||||||
this.props = new Properties();
|
this.props = new Properties();
|
||||||
props.load(new ByteArrayInputStream(sb.toString().getBytes()));
|
// props.load always assumes iso8859-1...
|
||||||
|
props.load(new ByteArrayInputStream(sb.toString().getBytes("ISO-8859-1")));
|
||||||
|
|
||||||
// make sure work dir is set properly
|
// make sure work dir is set properly
|
||||||
if (props.get("work.dir") == null) {
|
if (props.get("work.dir") == null) {
|
||||||
|
|
|
@ -19,7 +19,8 @@ package org.apache.lucene.benchmark.byTask;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileReader;
|
import java.io.FileInputStream;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.text.Collator;
|
import java.text.Collator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -398,7 +399,9 @@ public class TestPerfTasksLogic extends BenchmarkTestCase {
|
||||||
// Run algo
|
// Run algo
|
||||||
Benchmark benchmark = execBenchmark(algLines1);
|
Benchmark benchmark = execBenchmark(algLines1);
|
||||||
|
|
||||||
BufferedReader r = new BufferedReader(new FileReader(lineFile));
|
BufferedReader r = new BufferedReader(
|
||||||
|
new InputStreamReader(
|
||||||
|
new FileInputStream(lineFile), "UTF-8"));
|
||||||
int numLines = 0;
|
int numLines = 0;
|
||||||
String line;
|
String line;
|
||||||
while((line = r.readLine()) != null) {
|
while((line = r.readLine()) != null) {
|
||||||
|
|
Loading…
Reference in New Issue