Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.6k views
in .NET FTP by (240 points)
What's the safest encoding to use in my case? I only have any combination of the ff. characters:
1. alphanumeric
2. underscore
3. white space
4. period
5. single-quote.
I wasn't specifying a commandencoding at first and I found out that those files with special characters (for example, TIMOTHY_O'NEAL_123456_M.doc) will not go through.
I ran some tests and I had success with System.Text.Encoding.Default, or System.Text.Encoding.GetEncoding("Windows-1252"), or System.Text.Encoding.GetEncoding("ISO-8859-1")
although I am not sure which one is best for me as I am not familiar with this.
All the machines involved like the pc where the file was created, the server, and the client machine are Windows-based if that will help.

Also, do I have to specify the commandencoding for the ftpconnection control everytime I connect to the ftpserver or I can do it only once and it will stick?

1 Answer

0 votes
by (162k points)
Windows-1252 should be fine for you (very similar to 8859-1).

You only have to set the property once for a connection object.

Categories

...