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.
This commit is contained in:
Eli Zaretskii 2013-09-13 16:22:47 +03:00
parent 3509fb4083
commit 84387cd259
2 changed files with 9 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2013-09-13 Eli Zaretskii <eliz@gnu.org>
* term.el (term-emulate-terminal): Decode the command string
before passing it to term-command-hook. (Bug#15337)
2013-09-13 Glenn Morris <rgm@gnu.org>
* eshell/esh-util.el (ange-cache): Move declaration earlier.

View file

@ -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))))