diff --git a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java index 0d53a1aa003..88af670dfa2 100644 --- a/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java +++ b/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/utils/Config.java @@ -80,7 +80,8 @@ public class Config { } // read props from string 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 if (props.get("work.dir") == null) { diff --git a/lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java b/lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java index ac1b7589567..740cd13716a 100755 --- a/lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java +++ b/lucene/benchmark/src/test/org/apache/lucene/benchmark/byTask/TestPerfTasksLogic.java @@ -19,7 +19,8 @@ package org.apache.lucene.benchmark.byTask; import java.io.BufferedReader; import java.io.File; -import java.io.FileReader; +import java.io.FileInputStream; +import java.io.InputStreamReader; import java.io.StringReader; import java.text.Collator; import java.util.List; @@ -398,7 +399,9 @@ public class TestPerfTasksLogic extends BenchmarkTestCase { // Run algo 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; String line; while((line = r.readLine()) != null) {