Hi Create a small project / unit test and attach it to a JIRA ticket. And make sure those txt files is saved in that encoding your expect.
Then we can do a test on windows to ensure it works as expected. On Fri, Oct 8, 2010 at 10:59 AM, Andreas A. <andreasasm...@gmail.com> wrote: > > 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. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus