Hi
I'm interacting with a system that inputs and outputs textfiles in charset
Cp865.
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
chars.
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),
"Cp865");
Writer out = new OutputStreamWriter(new FileOutputStream(outfile),
"Windows-1252");
int c;
while ((c = in.read()) != -1){
out.write(c);}
in.close();
out.close();
}
Any tips?
--
View this message in context:
http://camel.465427.n5.nabble.com/Charset-conversion-issue-tp3204282p3204282.html
Sent from the Camel - Users mailing list archive at Nabble.com.