>I noticed that when i read files from an FTP
>using FtpWebRequest, the file names using
swedish characters seem not to be interpreted
correctly. I get a square, instead.
After having looked for an hour or so, i gave
up - where do i specify the encoding for the
communication with the FTP server?
If you get a file binary with Stream's then you do not
care about encoding.
If you get a file text with StreamReader and StreamWriter
then those two classes has constructors that takes an
Encoding as argument.
Thanks. I still have two problems. I'd go with
the binary style, however, i'm reading the list
of all files using
WebRequestMethods.Ftp.ListDirectory;
and i don't know the size of the result. What
size of the buffer need i to declare?
Also, when i tried to read the contents of the
stream, i got an exception.
System.Net.ProtocolViolationException
What to do?
My hypothesis is that i can't read binary using
ListDirectory method. Is that true?
--
Regards
Konrad Viltersten
----------------------------------------
May all spammers die an agonizing death;
have no burial places; their souls be
chased by demons in Gehenna from one room
to another for all eternity and beyond.