Which version of Camel are you using?
xslt-transformation will use "UTF-8" the by default, and you can change
it by setting the system property for it, but it relates to the Camel
version that you are using.
Willem
----------------------------------
Apache Camel, Apache CXF committer
Open SOA http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang
Andreas Asmuss wrote:
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?