Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
5.2k views
in .NET FTP by (160 points)
Hi,

I'm using edt free version.

I'm in trouble to upload files when filename (only filename) containing special characters as cyrillic characters.

Here is my code :

FTPClient instanciation :

// Instanciation
FTPClient ftpClient = new FTPClient();
// FTP port
ftpClient.ControlPort = port;
// FTP Host
ftpClient.RemoteHost = host;
// Connection Mode
ftpClient.ConnectMode = FTPConnectMode.PASV;
// Control Encoding
ftpClient.ControlEncoding = System.Text.Encoding.GetEncoding("ISO-8859-1");
//Connection
ftpClient.Connect();
//Login
ftpClient.Login(userName, userPwd);
ftpClient.TransferType = FTPTransferType.BINARY;

File upload :

ftpClient.Put(filePath, remoteFileName);

This code works fine when the filename contains only european characters (special characters like

2 Answers

0 votes
by (162k points)
Does any client succeed in doing this?
0 votes
by (160 points)
Hi,

No client succeed in send files with cyrillic characters in the filename.

However, I change the ftp server to use utf8 compliant ftp server and it works!
Previously i used IIS 6 (impossible to send my files with cyrillic characters in the filename), now i use FileZilla, i have tested with cyrillic and chinese characters after specifying ControlEncoding as Utf8 (with bom) , and it seems to be ok!

Categories

...