Menu

#1708 Error 404 when accessing local file with localized characters in path

2.18
closed
RBRi
None
1
2015-08-08
2015-08-08
Dims
No

In the code below it causes error 404 for first 2 urls but runs ok in 3rd.

All files exist in all cases.

public class AccessLocalfilesTry {

public static void main(String[] args) {

    //String url = "file:///D:/Users/dims/%D0%9C%D0%BE%D0%B8%20%D1%84%D0%B0%D0%B9%D0%BB%D1%8B/Fiddler2/Scripts/BrowserPAC.js"; // error 404
    //String url = "file:///D:/Users/dims/Мои%20файлы/Fiddler2/Scripts/BrowserPAC.js"; // error 404
    String url = "file:///D:/Users/BrowserPAC.js"; // error

    try (final WebClient webClient = new WebClient()) {
        HtmlPage page = webClient.getPage(url);
        System.out.println(page.toString());
    } catch (MalformedURLException e) {
        e.printStackTrace();
    } catch (IOException e) {
        e.printStackTrace();
    }

}
}

Discussion

  • Dims

    Dims - 2015-08-08

    Sorry thirg case comment should be
    // ok

     
  • RBRi

    RBRi - 2015-08-08
    • status: open --> accepted
    • assigned_to: RBRi
     
  • RBRi

    RBRi - 2015-08-08
    • status: accepted --> closed
     
  • RBRi

    RBRi - 2015-08-08

    Fixed in SVN. Thanks for reporting.
    You can download a new snapshot build from our build server. Additionally i will deploy a new snapshot build soon.

     

Log in to post a comment.

Auth0 Logo