c# - File name is showing in wrong encode after uploading to ftp server -


after uploading of file ftp server, file name showing ????????. file name contains cyrillic words. inside of file showing correct. should done show correct file names? code here:

        fileinfo fileinfo = new fileinfo(filepath);         string filename = fileinfo.name.tostring();         webrequest requestftp = webrequest.create(incomingftppath + filename);          requestftp.credentials = new networkcredential(ftpusername, ftppassword);         requestftp.method = webrequestmethods.ftp.uploadfile;         filestream fstream = fileinfo.openread();         int bufferlength = 2048;         byte[] buffer = new byte[bufferlength];          stream uploadstream = requestftp.getrequeststream();         int contentlength = fstream.read(buffer, 0, bufferlength);          while (contentlength != 0)         {             uploadstream.write(buffer, 0, contentlength);             contentlength = fstream.read(buffer, 0, bufferlength);         }         uploadstream.close();         fstream.close();         requestftp = null;  


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -