You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by vi...@apache.org on 2012/06/23 04:55:09 UTC
svn commit: r1353062 - in /incubator/vxquery/branches/vxquery_algebricks:
vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java
Author: vinayakb
Date: Sat Jun 23 02:55:06 2012
New Revision: 1353062
URL: http://svn.apache.org/viewvc?rev=1353062&view=rev
Log:
Fixed incorrect character encoding in reading input files
Modified:
incubator/vxquery/branches/vxquery_algebricks/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
incubator/vxquery/branches/vxquery_algebricks/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java?rev=1353062&r1=1353061&r2=1353062&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java Sat Jun 23 02:55:06 2012
@@ -226,7 +226,7 @@ public class VXQuery {
}
private static String slurp(String query) throws IOException {
- return FileUtils.readFileToString(new File(query));
+ return FileUtils.readFileToString(new File(query), "UTF-8");
}
private static class CmdLineOptions {
Modified: incubator/vxquery/branches/vxquery_algebricks/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java
URL: http://svn.apache.org/viewvc/incubator/vxquery/branches/vxquery_algebricks/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java?rev=1353062&r1=1353061&r2=1353062&view=diff
==============================================================================
--- incubator/vxquery/branches/vxquery_algebricks/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java (original)
+++ incubator/vxquery/branches/vxquery_algebricks/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/TestRunnerFactory.java Sat Jun 23 02:55:06 2012
@@ -14,7 +14,9 @@
*/
package org.apache.vxquery.xtest;
-import java.io.FileReader;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
@@ -50,7 +52,7 @@ public class TestRunnerFactory {
long start = System.currentTimeMillis();
try {
XMLQueryCompiler compiler = new XMLQueryCompiler(null);
- FileReader in = new FileReader(testCase.getXQueryFile());
+ Reader in = new InputStreamReader(new FileInputStream(testCase.getXQueryFile()), "UTF-8");
CompilerControlBlock ccb = new CompilerControlBlock(new StaticContextImpl(
RootStaticContextImpl.INSTANCE), new FileSplit[] {});
compiler.compile(testCase.getXQueryDisplayName(), in, ccb, opts.optimizationLevel);