Note that there are some explanatory texts on larger screens.

plurals
  1. POFtpWebrequest - filename contains german "Umlaute" like ä,ö
    text
    copied!<p>I'm trying to get a file via FTP per FtpWebrequest - the download fails when the filename contains german Umlaute like ä,ö,ü.</p> <p>Code:</p> <pre><code>FtpWebRequest request2 = (FtpWebRequest)WebRequest.Create("ftp://re-web-03.servername.de/" + "filename with ä.xls"); request2.Method = WebRequestMethods.Ftp.DownloadFile; request2.Credentials = new NetworkCredential("xxx", "xxx"); using (FtpWebResponse response = (FtpWebResponse)request2.GetResponse()) { // &lt;-- Exception: The remote server returned an error: (550) File unavailable ... </code></pre> <p>When changing the file name to "filename with ae.xls" it works. </p> <p>The Exception is: WebException: The remote server returned an error: (550) File unavailable (e.g., file not found, no access).</p> <p>A Directory Listing via ftp works well and shows the filename: </p> <pre><code>FtpWebRequest request = (FtpWebRequest)WebRequest.Create("ftp://re-web-03.servername.de/"); request.Method = WebRequestMethods.Ftp.ListDirectory; request.Credentials = new NetworkCredential("xxx", "xxx"); using (FtpWebResponse response = (FtpWebResponse)request.GetResponse()) { StreamReader sr = new StreamReader(response.GetResponseStream()); while (!sr.EndOfStream) { Console.WriteLine(sr.ReadLine()); } // --&gt; output is "filename with ä.xls" } </code></pre> <p>Output is "filename with ä.xls". </p> <p>Does someone have a tip how to deal with that problem - I do not have any influence on naming that files ...</p> <p>Many thanks in advance Tobi</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload