mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-17 18:37:33 +00:00
* net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
Prefer utf-8 coding. (Bug#17859)
This commit is contained in:
parent
a519335cc3
commit
005f996739
2 changed files with 13 additions and 5 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2014-07-01 Michael Albinus <michael.albinus@gmx.de>
|
||||
|
||||
* net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
|
||||
Prefer utf-8 coding. (Bug#17859)
|
||||
|
||||
2014-06-30 Fabián Ezequiel Gallina <fgallina@gnu.org>
|
||||
|
||||
* emacs-lisp/subr-x.el (string-reverse): Define as obsolete alias
|
||||
|
|
|
|||
|
|
@ -3964,15 +3964,16 @@ process to set up. VEC specifies the connection."
|
|||
;; Try to set up the coding system correctly.
|
||||
;; CCC this can't be the right way to do it. Hm.
|
||||
(tramp-message vec 5 "Determining coding system")
|
||||
(tramp-send-command vec "echo foo ; echo bar" t)
|
||||
(with-current-buffer (process-buffer proc)
|
||||
(goto-char (point-min))
|
||||
(if (featurep 'mule)
|
||||
;; Use MULE to select the right EOL convention for communicating
|
||||
;; with the process.
|
||||
(let* ((cs (or (tramp-compat-funcall 'process-coding-system proc)
|
||||
(cons 'undecided 'undecided)))
|
||||
cs-decode cs-encode)
|
||||
(let ((cs (or (when (string-match
|
||||
"utf8" (or (tramp-get-remote-locale vec) ""))
|
||||
(cons 'utf-8 'utf-8))
|
||||
(tramp-compat-funcall 'process-coding-system proc)
|
||||
(cons 'undecided 'undecided)))
|
||||
cs-decode cs-encode)
|
||||
(when (symbolp cs) (setq cs (cons cs cs)))
|
||||
(setq cs-decode (car cs))
|
||||
(setq cs-encode (cdr cs))
|
||||
|
|
@ -3980,6 +3981,8 @@ process to set up. VEC specifies the connection."
|
|||
(unless cs-encode (setq cs-encode 'undecided))
|
||||
(setq cs-encode (tramp-compat-coding-system-change-eol-conversion
|
||||
cs-encode 'unix))
|
||||
(tramp-send-command vec "echo foo ; echo bar" t)
|
||||
(goto-char (point-min))
|
||||
(when (search-forward "\r" nil t)
|
||||
(setq cs-decode (tramp-compat-coding-system-change-eol-conversion
|
||||
cs-decode 'dos)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue