camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <willem.ji...@gmail.com>
Subject Re: Charset conversion issue.
Date Fri, 08 Oct 2010 12:49:20 GMT
On 10/8/10 8:03 PM, Andreas A. wrote:
>
> Hi Willem
>
> Can you explain why you think it makes sense?
>
>
> - Andreas
<from uri="file:data/in/test" />

The message body is an InputStream, with this convert, the body is 
changed to String with the charset Cp865.

<convertBodyTo charset="Cp865" type="String" />

The message body is not change yet, and it set the exchange property 
with key Exchange.CHARSET_NAME and value "Cp1252", when send the message 
to a File endpoint, camel converter will turn the String into a 
ByteArrayInputStream with the charset Cp1252.

<convertBodyTo charset="Cp1252" type="String" />

I think you can write a right customer processor with this information.

-- 
Willem
----------------------------------
Open Source Integration: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: http://twitter.com/willemjiang

Mime
View raw message