ftp-Filename中的#问题 [英] Problem with # in ftp-Filename

查看:133
本文介绍了ftp-Filename中的#问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在Visual C#中编码.一个任务是将文件升级到ftp服务器.在文件名中必须使用#.使用* .bat上传文件效果很好,但是在我的应用中执行该操作会导致ftp服务器上的文件名,其中仅使用#首次出现之前的字母.

在调试器中,正确显示了包含ftp-path的文件名.

欢迎任何建议.

Thx

macrene

解决方案

似乎是编码问题,或者您使用的FTP客户端类存在错误.你在用什么您是否使用普通的FTP客户端尝试了相同的路径名?如果可行,请跟踪与网络嗅探器的通信,并查看其编码方式.还要跟踪您的应用程序,看看有什么不同.理论上,哈希标记是RFC允许的.但是请注意,只有在符合RFC 2640的情况下,FTP才不兼容UTF-8.


必须使用FTP路径%23"中的#"代替.


blockquote>

Hi,

I''m coding in Visual C#. One task is to uplaod a file to an ftp-Server. In the filename # have to be used. Uploading the files with a *.bat works fine, but doing it in my app leads to filename on the ftp-Server, where only the letters before the first appearance of # is used.

In the debugger the ftp-path inclusive filename is shown correctly.

Any suggestions welcomed.

Thx

macrene

解决方案

It seems to be an encoding issue, or the FTP client class you use has a bug. What are you using? Have you tried the same path name using a normal FTP client? If it works trace the communication with a network sniffer, and see how it is encoded. Trace your app also and see the difference. Theoretically hashmark is allowed by the RFC. But be aware that FTP is not UTF-8 compliant, only when complies with RFC 2640.


Instead of "#" in the FTP-path "%23" must be used.


这篇关于ftp-Filename中的#问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆