diff options
Diffstat (limited to 'lisp/net/browse-url.el')
-rw-r--r-- | lisp/net/browse-url.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index ff654f2374..461a054382 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el @@ -723,9 +723,12 @@ interactively. Turn the filename into a URL with function (defun browse-url-file-url (file) "Return the URL corresponding to FILE. Use variable `browse-url-filename-alist' to map filenames to URLs." - (let ((coding (and (default-value 'enable-multibyte-characters) - (or file-name-coding-system - default-file-name-coding-system)))) + (let ((coding (if (equal system-type 'windows-nt) + ;; W32 pretends that file names are UTF-8 encoded. + 'utf-8 + (and (default-value 'enable-multibyte-characters) + (or file-name-coding-system + default-file-name-coding-system))))) (if coding (setq file (encode-coding-string file coding)))) (setq file (browse-url-url-encode-chars file "[*\"()',=;?% ]")) (dolist (map browse-url-filename-alist) |