Encoding Camel FTP:带有umlaut的目录名

Encoding Camel FTP:带有umlaut的目录名,encoding,ftp,apache-camel,Encoding,Ftp,Apache Camel,我正在使用camel ftp,我在目录名中遇到了德语umlauts(例如Ö)问题,无法连接到ftp服务器。我无法重命名此目录,因为它是公司的工作目录 我使用camel.version:2.18.1和camel-ftp.version:2.18.1 我配置了以下路由(在路由中,我定义了包含umlaut的目录,其中使用unicode字符\u00d6表示Ö): 错误消息: Consumer FtpConsumer[ftp://user@hostname:21/etc//0�ffentlicherO

我正在使用camel ftp,我在目录名中遇到了德语umlauts(例如Ö)问题,无法连接到ftp服务器。我无法重命名此目录,因为它是公司的工作目录

我使用camel.version:2.18.1和camel-ftp.version:2.18.1

我配置了以下路由(在路由中,我定义了包含umlaut的目录,其中使用unicode字符\u00d6表示Ö):

错误消息:

Consumer FtpConsumer[ftp://user@hostname:21/etc//0�ffentlicherOrdner/test?password=xxxxxx] 
failed polling endpoint: ftp://ftp://user@hostname:21/etc/0�ffentlicherOrdner/test?password=xxxxxx. 
Will try again at next poll. 
Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - 
File operation failed: 550 �ffentlicherOrdner: Das System kann die angegebene Datei nicht finden.
Route: kurse started and consuming from: ftp://user@hostname:21/etc/ÖffentlicherOrdner/test?charset=ISO-8859-1&consumer.bridgeErrorHandler=true&ftpClient.controlEncoding=ISO-8859-1&password=xxxxxx
使用以下参数延伸管线时:

&ftpClient.controlEncoding=ISO-8859-15    
&charset=ISO-8859-15    
&consumer.bridgeErrorHandler=true
然后我得到的结果是一切正常,因为我没有收到任何错误消息:

Consumer FtpConsumer[ftp://user@hostname:21/etc//0�ffentlicherOrdner/test?password=xxxxxx] 
failed polling endpoint: ftp://ftp://user@hostname:21/etc/0�ffentlicherOrdner/test?password=xxxxxx. 
Will try again at next poll. 
Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - 
File operation failed: 550 �ffentlicherOrdner: Das System kann die angegebene Datei nicht finden.
Route: kurse started and consuming from: ftp://user@hostname:21/etc/ÖffentlicherOrdner/test?charset=ISO-8859-1&consumer.bridgeErrorHandler=true&ftpClient.controlEncoding=ISO-8859-1&password=xxxxxx
但是现在没有文件被轮询。我在测试目录中有一些文件,但当我启动进程时,它并没有将文件推送到端点

我不明白为什么它不使用这些文件?也许编码还是错的

编辑:

我对编码太过执着,以至于没有检查FTP属性

我的问题的解决方案是设置被动模式:

&passiveMode=true

作为测试,您可以尝试使用recursive=true,然后将起始目录配置为该德语目录的父目录,然后查看它是否可以遍历该文件夹并下载文件,例如,避免使用德语字符配置起始目录,我没有检查FTP属性。我的问题的解决办法是设置被动模式。