# HG changeset patch # User Kenichi Handa # Date 1048075105 0 # Node ID ecb46e1986f07746f90dc50c6710d6bb9be4f693 # Parent 320721ae597833cdd060172109317bdac803cbc1 * dired.el (dired-get-filename): Pay attention to the case that `read' returns a unibyte string. Don't encode the file name by buffer-file-coding-system. diff -r 320721ae5978 -r ecb46e1986f0 lisp/dired.el --- a/lisp/dired.el Wed Mar 19 11:54:57 2003 +0000 +++ b/lisp/dired.el Wed Mar 19 11:58:25 2003 +0000 @@ -1462,16 +1462,17 @@ (or (dired-string-replace-match "\\([^\\]\\|\\`\\)\"" file "\\1\\\\\"" nil t) file) - "\""))))) + "\""))) + ;; The above `read' will return a unibyte string if FILE + ;; contains eight-bit-control/graphic characters. + (if (and enable-multibyte-characters + (not (multibyte-string-p file))) + (setq file (string-to-multibyte file))))) (and file (file-name-absolute-p file) ;; A relative file name can start with ~. ;; Don't treat it as absolute in this context. (not (eq (aref file 0) ?~)) (setq already-absolute t)) - (and file buffer-file-coding-system - (not file-name-coding-system) - (not default-file-name-coding-system) - (setq file (encode-coding-string file buffer-file-coding-system))) (cond ((null file) nil)