Repository: camel
Updated Branches:
  refs/heads/master a01e2bd3a -> 028700818


CAMEL-8356 Fixed the test error on other box


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/02870081
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/02870081
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/02870081

Branch: refs/heads/master
Commit: 028700818ccf660a02586a19fc31399684cb1b2e
Parents: a01e2bd
Author: Willem Jiang <willem.ji...@gmail.com>
Authored: Thu Feb 26 14:59:10 2015 +0800
Committer: Willem Jiang <willem.ji...@gmail.com>
Committed: Thu Feb 26 14:59:26 2015 +0800

----------------------------------------------------------------------
 .../org/apache/camel/converter/IOConverterCharsetTest.java     | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/02870081/camel-core/src/test/java/org/apache/camel/converter/IOConverterCharsetTest.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/test/java/org/apache/camel/converter/IOConverterCharsetTest.java
 
b/camel-core/src/test/java/org/apache/camel/converter/IOConverterCharsetTest.java
index 4d30291..fe74d75 100644
--- 
a/camel-core/src/test/java/org/apache/camel/converter/IOConverterCharsetTest.java
+++ 
b/camel-core/src/test/java/org/apache/camel/converter/IOConverterCharsetTest.java
@@ -31,7 +31,8 @@ public class IOConverterCharsetTest extends 
ContextTestSupport {
     public void testToInputStreamFileWithCharsetUTF8() throws Exception {
         File file = new 
File("src/test/resources/org/apache/camel/converter/german.utf-8.txt");
         InputStream in = IOConverter.toInputStream(file, "UTF-8");
-        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+        // need to specify the encoding of the input stream bytes
+        BufferedReader reader = new BufferedReader(new InputStreamReader(in, 
"UTF-8"));
         BufferedReader naiveReader = new BufferedReader(new 
InputStreamReader(new FileInputStream(file), "UTF-8"));
         try {   
             String line = reader.readLine();
@@ -48,7 +49,8 @@ public class IOConverterCharsetTest extends 
ContextTestSupport {
     public void testToInputStreamFileWithCharsetLatin1() throws Exception {
         File file = new 
File("src/test/resources/org/apache/camel/converter/german.iso-8859-1.txt");
         InputStream in = IOConverter.toInputStream(file, "ISO-8859-1");
-        BufferedReader reader = new BufferedReader(new InputStreamReader(in));
+        // need to specify the encoding of the input stream bytes
+        BufferedReader reader = new BufferedReader(new InputStreamReader(in, 
"UTF-8"));
         BufferedReader naiveReader = new BufferedReader(new 
InputStreamReader(new FileInputStream(file), "ISO-8859-1"));
         try {
             String line = reader.readLine();

Reply via email to