camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-8356) IOConverter.toInputStream(file, charset) returns strange behaving stream
Date Wed, 03 Jun 2015 07:24:50 GMT

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

Willem Jiang edited comment on CAMEL-8356 at 6/3/15 7:24 AM:
-------------------------------------------------------------

[~ssidashov]
I just found you use char array as buffer to read the stream, what if the read method just
read more than 128 character. Can you submit a simple test case for us to dig the issue?


was (Author: njiang):
[~ssidashov] Can you submit a simple test case for us to dig the issue?

> 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
>            Assignee: Willem Jiang
>             Fix For: 2.14.2, 2.15.0
>
>         Attachments: CAMEL8356-repaired-Test-and-adjusted-converter-imple.patch, 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)

Mime
View raw message