Determine correct character set for file names in camel-ftp
-----------------------------------------------------------
Key: CAMEL-3787
URL: https://issues.apache.org/jira/browse/CAMEL-3787
Project: Camel
Issue Type: Improvement
Components: camel-ftp
Affects Versions: 2.6.0
Environment: Windows XP, Serv-U (ftp server)
Reporter: Bengt Rodehav
Being Swedish the file names sometimes contain national characters (åäöÅÄÖ).
This does not work out-of-the-box in camel-ftp.
In order for this to work, the control encoding must be properly set or the
characters in the file name will be misinterpreted. In my case, the ftp server
was Serv-U. Serv-U supports UTF-8 and uses it by default. I read somewhere that
if the ftp server supports UTF-8, then it should use UTF-8 if the client
doesn't tell it not to. I managed to get this to work by specifying the
following URI option:
{quote}
&ftpClient.controlEncoding=UTF-8??
{quote}
In comparison, the Filezilla ftp client handles this much better. It issues the
FEAT command and if the server responds with UTF8, then Filezilla will request
that UTF-8 is used (with an OPTS command). Ideally, camel-ftp should use the
same logic. Or, if that is unnecessary overhead, then camel-ftp could have an
"autoconfig" option that would cause camel-ftp to try to find the best
configuration of options that are not specified on the URI, e g the
controlEncoding.
Whether UTF-8 should be the default control encoding or not is also a valid
question.
Note that camel-ftp uses Commons Net Ftp. Perhaps the autoconfig option belongs
there.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira