简体   繁体   English

通过FTP下载文件时用空格将文件名包裹起来的正确方法是什么

[英]What is the correct way to wrap file names with space when download files via FTP

I have written a FTP client ( To learn). 我已经写了一个FTP客户端(要学习)。

Im having problems when handling with spaces. 我在处理空格时遇到问题。 What is the accepted solution for this ( Preferably one that works with "all" ftp servers). 什么是可接受的解决方案(最好是与“所有” ftp服务器一起使用的解决方案)。
I have tried: 我努力了:
1)Just sending the path name. 1)只需发送路径名。
2)Sending "FileName With Space.omg" 2)发送“ FileName With Space.omg”
3)Sending \\"FileName With Space.omg\\" 3)发送\\“ FileName With Space.omg \\”

Version 3 "works" with getting filesize, in terms the server returns a size 0(Its NOT actualy 0 sized file), but when doing this method for download the server does not accept it. 版本3在获取文件大小时“可用”,即服务器返回的大小为0(实际上不是大小为0的文件),但是在执行此下载方法时,服务器不接受。


If it mathers to ppl, this is on a windows mobile and .NET compact framework 2 如果可以理解ppl,则使用Windows Mobile和.NET Compact Framework 2

Have you tried escaping the spaces? 您是否尝试过转义空间? (" " --> "%20") (“”--“%20”)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM