camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Maas <pfmm...@gmail.com>
Subject character encoding
Date Tue, 21 Apr 2009 14:28:07 GMT
Hi,

I am experiencing some weird behavior on the character encoding front.  
I have simplified/narrowed the problem down to the conversion from  
file input to xml:

     from("file:src/data/input")
       .to("direct:tvaDropbox");

     from("direct:tvaDropbox")
       .to("xslt:tvaTransformer.xsl")
       .to("file:src/data/output");


If I input a valid xml document containing utf-8 characters the file  
written in the output directory contains unmapped characters. For  
instance é is mapped in a single byte 'E8' instead of 'C3 A9'. If I  
add a conversion to string:


     from("file:src/data/input")
       .convertBodyTo(String.class)
       .to("log:info?showAll=true")
       .to("direct:tvaDropbox");


The output matches what I expect. Seems a bit odd to manually convert  
to a string in this case... any ideas?

-P
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message