FtpWebrequest - filename contains german “Umlaute” like ä,ö

后端 未结 2 2065
被撕碎了的回忆
被撕碎了的回忆 2021-01-22 22:18

I\'m trying to get a file via FTP per FtpWebrequest - the download fails when the filename contains german Umlaute like ä,ö,ü.

Code:

FtpWebRequest reques         


        
2条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-22 22:35

    Fetching the Filelist in UTF7 Encoding:

    StreamReader sr = new StreamReader(response.GetResponseStream(),Encoding.UTF7);
    

    did return the filename "Cases täglich .xls" in a way I can Downlod via Method "DownloadFile"

提交回复
热议问题