From 80346f1ae4b3d56490e4a744df2bf1db00844ddc Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 15 Dec 2015 23:54:11 +0100 Subject: [PATCH] Set utf8 encoding with stty in Tramp * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): Move up uname check. Handle Mac OS X eol encoding. Set utf8 encoding with stty. --- lisp/net/tramp-sh.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index ebf646f26ff..6cd29c1ca6c 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4288,6 +4288,10 @@ process to set up. VEC specifies the connection." (tramp-get-connection-property vec "uname" "")) (tramp-send-command vec "stty -oxtabs" t)) + ;; Set utf8 encoding. Needed for Mac OS X, for example. This is + ;; non-POSIX, so we must expect errors on some systems. + (tramp-send-command vec "stty iutf8 2>/dev/null" t) + ;; Set `remote-tty' process property. (let ((tty (tramp-send-command-and-read vec "echo \\\"`tty`\\\"" 'noerror))) (unless (zerop (length tty)) -- 2.39.2