Hi,

I just check the code, xslt component uses UTF-8 as the default
character encoding, and the ConertBodyTo(String.class) using the default
character encoding of your OS.
I don't know if the testing xml document is really encoded with UTF-8.

BTW, you can set the encoding of XSLT component by setting the character
encoding name with this system property key
"org.apache.camel.default.charset".

Willem


Peter Maas wrote:
> I'm using the camel snapshot release... but recall having this problem
> before.
> 
> On Apr 21, 2009, at 16:28 , Peter Maas wrote:
> 
>> 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
> 
> 

Reply via email to