Repository: camel Updated Branches: refs/heads/camel-2.14.x c02c61df6 -> 046f438d4
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/046f438d Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/046f438d Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/046f438d Branch: refs/heads/camel-2.14.x Commit: 046f438d473d47a61a0ef960a2ccbab7c9e0e69a Parents: c02c61d 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 15:00:35 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/046f438d/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();