views:

101

answers:

1

When using FtpWebRequest to list files and folders, can I list names with foreign characters?

A file name with 3 Chinese characters will come accross as "???" when enumerating files with FtpWebRequest:

-rwxr-xr-x 1 user group 1800 Dec 22 16:13:10 ???

Am I doing something wrong, or does FtpWebRequest not support this?

my code is derived from the example here: http://msdn.microsoft.com/en-us/library/ms229716.aspx

Thanks, Bryan

A: 

If its just a string, try to use Encoding.Convert() method which can convert the file name from ome encoding to another. (Add System.Text)

http://msdn.microsoft.com/en-us/library/kdcak6ye.aspx

PortageMonkey