Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
3.3k views
in Java FTP by (240 points)
Hi I have been having problems with recieving files/streams with some special characters such as the swedish

2 Answers

0 votes
by (240 points)
Ha ha hah

There is a problem with characters also in the forum i see maybe I should have included the code instead DOH!

public static String downLoad(String filename){ 
  
        try {
            inS = ftp.downloadStream(filename);
            int ch = 0;
            while ((ch = inS.read()) != -1) {
                if (ch < -1 ) {
                if (ch == -27){sb.append("
0 votes
by (51.6k points)
Actually the problem is with the character encoding of the reader for the data-channel. You can change this using FTPConnection.DataEncoding. Try setting it to Encoding.GetEncoding("Windows-1252") or Encoding.GetEncoding("ISO-8859-1"). If you get the encoding right then you shouldn't need to do the manual translation that you are doing in the code you posted.

- Hans (EnterpriseDT)

Categories

...