2

从 ftp 服务器 csv 文件填充 c# 中的数据表。我可以读取 csv 文件,但它提供的内容是编码格式,如'\000\3000' 等。所以请帮我解决这个问题。提前致谢。

逻辑:

 string ftpPath = (@"****.csv");
        FtpWebRequest reqFTP = (FtpWebRequest)FtpWebRequest.Create(new Uri(ftpPath));
        reqFTP.UsePassive = true;
        reqFTP.UseBinary = true;
        reqFTP.EnableSsl = false;
        reqFTP.Credentials = new NetworkCredential("user", "password");
        reqFTP.Method = WebRequestMethods.Ftp.DownloadFile;
        reqFTP.KeepAlive = true;
        reqFTP.Proxy = WebRequest.DefaultWebProxy;
        FtpWebResponse response = (FtpWebResponse)reqFTP.GetResponse();
        Stream responseStream = response.GetResponseStream();
        List<string> entries = new List<string>();
4

0 回答 0