diff options
| author | Eli Zaretskii | 2013-12-03 14:21:13 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2013-12-03 14:21:13 +0200 |
| commit | d45c90885962da97a8d72d2ffb8ce38046d8cb58 (patch) | |
| tree | 6eaf922e1456fc625b681df891a9ce627d3f75f6 /lisp/net | |
| parent | 051546df1a4e52c44b612853fa14a653bc082860 (diff) | |
| download | emacs-d45c90885962da97a8d72d2ffb8ce38046d8cb58.tar.gz emacs-d45c90885962da97a8d72d2ffb8ce38046d8cb58.zip | |
Fixed drag-n-drop with Unicode file names.
Diffstat (limited to 'lisp/net')
| -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 ff654f23747..461a0543829 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 | |||
| 723 | (defun browse-url-file-url (file) | 723 | (defun browse-url-file-url (file) |
| 724 | "Return the URL corresponding to FILE. | 724 | "Return the URL corresponding to FILE. |
| 725 | Use variable `browse-url-filename-alist' to map filenames to URLs." | 725 | Use variable `browse-url-filename-alist' to map filenames to URLs." |
| 726 | (let ((coding (and (default-value 'enable-multibyte-characters) | 726 | (let ((coding (if (equal system-type 'windows-nt) |
| 727 | (or file-name-coding-system | 727 | ;; W32 pretends that file names are UTF-8 encoded. |
| 728 | default-file-name-coding-system)))) | 728 | 'utf-8 |
| 729 | (and (default-value 'enable-multibyte-characters) | ||
| 730 | (or file-name-coding-system | ||
| 731 | default-file-name-coding-system))))) | ||
| 729 | (if coding (setq file (encode-coding-string file coding)))) | 732 | (if coding (setq file (encode-coding-string file coding)))) |
| 730 | (setq file (browse-url-url-encode-chars file "[*\"()',=;?% ]")) | 733 | (setq file (browse-url-url-encode-chars file "[*\"()',=;?% ]")) |
| 731 | (dolist (map browse-url-filename-alist) | 734 | (dolist (map browse-url-filename-alist) |