X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03647350fc7cd141953c72e0284e928847d30f44..2f55b88cb00cdf1e47a7b1745f056882b016f74f:/src/common/filesys.cpp diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index 1e3740864e..29e794e570 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -694,7 +694,10 @@ wxString wxFileSystem::FileNameToURL(const wxFileName& filename) // here, in particular in GetRightLocation() url.Replace(wxT(":"), wxT("%3A")); url = wxT("file:") + url; - return url; + + // Do wxURI- and common practice-compatible escaping: encode the string + // into UTF-8, then escape anything non-ASCII: + return wxURI(url).BuildURI(); }