camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas A." <>
Subject Charset conversion issue.
Date Fri, 08 Oct 2010 08:59:17 GMT


I'm interacting with a system that inputs and outputs textfiles in charset
I want to fetchs files from the system and convert them to Cp1252 locally.
I want to convert outgoing files from Cp1252 to Cp865.

I'm trying to use a combination of
<convertBodyTo type="String" charset="Windows-1252" />
setting CamelCharsetName on the exchange
and System.setProperty("org.apache.camel.default.charset", "Cp865");

However the conversion isn't succeeding I get ? for some of the special

When doing this with pure Java it with streams it works fine:

public static void main(String[] args) throws IOException {

         File infile = new File("data/Cp865.txt");
         File outfile = new File("data/Cp1252.txt");

         Reader in = new InputStreamReader(new FileInputStream(infile),
         Writer out = new OutputStreamWriter(new FileOutputStream(outfile),
         int c;

         while ((c = != -1){


Any tips?
View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message