camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: FTP-producer charset java
Date Thu, 03 Oct 2013 09:20:27 GMT
Hi

See
https://issues.apache.org/jira/browse/CAMEL-5881

On Wed, Oct 2, 2013 at 10:08 AM, tero <ter055@yahoo.de> wrote:
> Hello,
>
> I am having troubles with the char encoding, sending data to a FTP server:
> the special chars like "ä" and similar are encoded wrong (e.g.: Südafrika ->
> Südafrika), even if I specify
> .setHeader(Exchange.CHARSET_NAME).constant("ISO-8859-1")
> which I understood is the way to define the encoding?
>
> I also tried setting that into the url, like this:
> .to("ftp://user@ftpHost//usr/goal/test/new/?charset=ISO-8859-1&password=xyz&fileExist=Append")
>
> That also doesn't solve the problem.
>
> I am using camel-version 2.11.0, and the interesting part in code is:
> .choice().when(header(NamesHolder.FTP_FILENAME).isNotNull())
>         .setHeader(Exchange.CHARSET_NAME).constant("ISO-8859-1")
>             .setHeader(Exchange.FILE_NAME).simple("${header." + NamesHolder.
> FTP_FILENAME + "}" + "e")
>                 //https://issues.apache.org/jira/browse/CAMEL-6309 ->
> workaround: two slashes after the host name
>
> .to("ftp://user@ftpHost//usr/goal/test/new/?password=xyz&fileExist=Append")
>            .end();
>
> I am new to Camel, so may I be doing st wrong there? I read the post
> http://camel.465427.n5.nabble.com/Problem-w-FTP-producer-and-charset-td5723604.html
> which let me think that, since there is not much differences with my issue
> and setting "CamelCharsetName" seems to work?
>
> Thanks for any hint.
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/FTP-producer-charset-java-tp5740744.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Mime
View raw message