Hi,

I want to operate in charset iso-8859-1 in my route because of some special
characters. Therefore I do <convertBodyTo type="String"
charset="iso-8859-1"> at the start of my routes. I also do
exchange.setProperty(Exchange.CHARSET_NAME, "iso-8859-1");

As long as JAXB is not involved this works fine. I can do
xslt-transformations etc. and the special characters are preserved. However
if I unmarshal/marshal with JAXB I get the error:
"Caused by: java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8
sequence."

Shouldn't JAXB expect encoding iso-8859-1 when I set
"exchange.setProperty(Exchange.CHARSET_NAME, "iso-8859-1");"?

If I make sure that the file coming in is encoded in UTF-8 I don't get this
error + the characters are preserved, eventhough I still do the
convertBodyTo and the CHARSET_NAME to iso-8859-1.

What could be wrong?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Encoding-acting-odd-tp1037744p1037744.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to