This depends on which extended (i.e. 8-bit) ASCII character set the server is using. Officially the FTP protocol (
RFC959) only supports 7-bit ASCII characters, but most servers actually support 8-bit ASCII (so to speak). As a result, the meaning of characters 0 to 127 is well defined, but the meaning of characters 128 to 255 varies from one server to the other. One server might interpret character 193 as an accented A, whereas another might interpret is as an accented E.
By default, edtFTPnet only supports 7-bit ASCII. If it encounters a character whose code is 128 to 255 it will represent it as a question mark. The FTPConnection.CommandEncoding property allows the developer to select an 8-bit character encoding that matches that of the server. Unfortunately many servers do not state what 8-bit ASCII character set they're using, so it's often necessary to use trial and error to find out.
Some common character encodings to try are:
ftpConnection.CommandEncoding = Encoding.GetEncoding("Windows-1252");
and
ftpConnection.CommandEncoding = Encoding.GetEncoding("ISO-8859-1");
- Hans (EDT)