title: java.io.FileNotFoundException when retrieving a url with umlauts in the filename
body: <p>I am trying to retrieve a url with an umlaut in the filename, something like "<a href="http://somesimpledomain.com/some/path/%C3%BCberfile.txt" rel="nofollow noreferrer">http://somesimpledomain.com/some/path/überfile.txt</a>", but it gives me a java.io.FileNotFoundException. I suspect that the filename on the remote server is encoded in latin1, though my url is in utf8. But my tries to change the encoding of the url weren't successful and I don't know how to debug it further. Please help!</p>
  
  <p>Code is as follows:</p>
  
  <pre><code>   HttpURLConnection conn = null;
      try {
         conn = (HttpURLConnection) new URL(uri).openConnection();
         conn.setRequestMethod("GET");
      } catch (MalformedURLException ex) {}
      } catch (IOException ex){}
  
      // Filter headers
      int i=1;
      String hKey;
      while ((hKey = conn.getHeaderFieldKey(i)) != null) {
          conn.getHeaderField(i);
          i++;
      }
  
      // Open the file and output streams
      InputStream in = null;
      OutputStream out = null;
      try {
          in = conn.getInputStream();
      } catch (IOException ex) {
          ex.printStackTrace();
      }
  
      try {
          out = response.getOutputStream();
      } catch (IOException ex) {
  }
  </code></pre>
  
  <p>Regards,
  Hendrik</p>