[ 
https://issues.apache.org/jira/browse/CAMEL-8356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14333668#comment-14333668
 ] 

ASF GitHub Bot commented on CAMEL-8356:
---------------------------------------

GitHub user almondtools opened a pull request:

    https://github.com/apache/camel/pull/406

    CAMEL-8356 IOConverter.toInputStream(file, charset) returns strange

    I extended some Unittests to point out the problems:
    - toReader(file, charset) does respect the charset
    - toStream(file, charset) does not respect the charset
    
    The provided Patch for IOConverter.toInputStream does respect the charset. 
I do not know if other projects already rely on the current behaviour that the 
charset is completely ignored.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/almondtools/camel master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/406.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #406
    
----
commit 9020431e167c2f03d96597d3c598fd988b2b5f56
Author: Stefan Mandel <[email protected]>
Date:   2015-02-14T17:31:37Z

    CAMEL-8356 IOConverter.toInputStream(file, charset) returns strange
    behaving stream

----


> 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)

Reply via email to