Hi

I have logged a number of JIRA tickets in terms of issues with the
file component
  https://issues.apache.org/jira/browse/CAMEL-5222
  https://issues.apache.org/jira/browse/CAMEL-5215
And this ticket is related
  https://issues.apache.org/jira/browse/CAMEL-5216


The problem is that the charset option on the component was not used
consistently.

For example if you wanted to convert files from utf-8 to iso-8859-1 you would do

from("file:inbox?charset=utf-8")
  .to("file:outbox?charset=iso-8859-1")

That would previously fail, not reading the files as utf-8.

Also if you forced a type conversion with a charset using
convertBodyTo, then the same happened that the file woudn't be read
using the utf-8 charset it was configured as.

from("file:inbox?charset=utf-8")
  .convertBodyTo(byte[].class, "iso-8859-1")
  .to("file:outbox")


All that has been tighten up, so Camel now always used the charset
option configured on the file endpoint, when it reads/writes the
files.


-- 
Claus Ibsen
-----------------
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: [email protected]
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to