Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
in .NET FTP by
Hi all.
I hope someone can help me a bit with this problem:

I'm trying to download a file called "

1 Answer

0 votes
I think I've found a way to fix it:
FTPControlSocket.cs, line 239:
writer = new StreamWriter(stream);
changed to
writer = new StreamWriter(stream,System.Text.Encoding.Default);

Purpose: enabling transfer of files with filenames containing Danish characters
Line 48: added
using System.Text;

Line 106: added
private static Encoding encoding = Encoding.Default;

line 1206:
StreamReader reader = new StreamReader(GetDataStream());
...changed to:
StreamReader reader = new StreamReader(GetDataStream(),encoding,true);

Purpose: Enabling proper transfer of filenames with Danish characters using "NLST" (Name List).

At least it seems to work for me in my scenario...