Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1517510F31 for ; Sun, 15 Feb 2015 15:06:13 +0000 (UTC) Received: (qmail 22775 invoked by uid 500); 15 Feb 2015 15:06:12 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 22495 invoked by uid 500); 15 Feb 2015 15:06:12 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 22339 invoked by uid 99); 15 Feb 2015 15:06:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 15 Feb 2015 15:06:12 +0000 Date: Sun, 15 Feb 2015 15:06:12 +0000 (UTC) From: "Stefan Mandel (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CAMEL-8356) IOConverter.toInputStream(file, charset) returns strange behaving stream MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CAMEL-8356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Mandel updated CAMEL-8356: --------------------------------- Attachment: IOConverterCharsetTest.java The third unit test shows that the returned byte stream is the same as a pure FileInputStream. This seems strange, because anybody can see that the implementation does use the specified charset. However the Streaming-Pipeline (Stream->BufferedReader->Stream) seems to loose it. As I said - i can hunt this bug down, but yet I am not certain if a majority recognizes this behaviour as bug. > IOConverter.toInputStream(file, charset) returns strange behaving stream > ------------------------------------------------------------------------ > > Key: CAMEL-8356 > URL: https://issues.apache.org/jira/browse/CAMEL-8356 > Project: Camel > Issue Type: Bug > Components: camel-core > Affects Versions: 2.14.1, 2.15.0 > Reporter: Stefan Mandel > Attachments: IOConverterCharsetTest.java, german.iso-8859-1.txt, german.utf-8.txt > > > Calling IOConverter.toInputStream with either UTF-8 or ISO-8859-1 returns a stream that behaves strange on non-ascii-characters: > - putting this stream into an InputStreamReader will return false encoded characters > - a naive new BufferedReader(new InputStreamReader(new FileInputStream(file), charset)) will return the correctly encoded characters. > I will attach some unit tests for this case. -- This message was sent by Atlassian JIRA (v6.3.4#6332)