From: Eli Zaretskii Date: Fri, 13 Sep 2013 13:22:47 +0000 (+0300) Subject: Fix bug #15337 with non-ASCII characters in file names used by ansi X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1640 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=84387cd2595e0e99bb6976fe1e160156b5291611;p=emacs.git Fix bug #15337 with non-ASCII characters in file names used by ansi lisp/term.el (term-emulate-terminal): Decode the command string before passing it to term-command-hook. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 014b48771c1..93156233ee1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-09-13 Eli Zaretskii + + * term.el (term-emulate-terminal): Decode the command string + before passing it to term-command-hook. (Bug#15337) + 2013-09-13 Glenn Morris * eshell/esh-util.el (ange-cache): Move declaration earlier. diff --git a/lisp/term.el b/lisp/term.el index 31889a78273..be080297b2e 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -2937,8 +2937,10 @@ See `term-prompt-regexp'." (let ((end (string-match "\r?$" str i))) (if end (funcall term-command-hook - (prog1 (substring str (1+ i) end) - (setq i (match-end 0)))) + (decode-coding-string + (prog1 (substring str (1+ i) end) + (setq i (match-end 0))) + locale-coding-system)) (setq term-terminal-parameter (substring str i)) (setq term-terminal-state 4) (setq i str-length))))