emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 eb85d55: Fix an utf8 problem for Tramp on BSD


From: Michael Albinus
Subject: [Emacs-diffs] emacs-25 eb85d55: Fix an utf8 problem for Tramp on BSD
Date: Mon, 07 Dec 2015 08:15:47 +0000

branch: emacs-25
commit eb85d55cea4c5a715c4381ab6aeee630183fa23e
Author: Michael Albinus <address@hidden>
Commit: Michael Albinus <address@hidden>

    Fix an utf8 problem for Tramp on BSD
    
    * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell):
    Make lax check for utf8.
    (tramp-get-remote-locale): Add "en_US.UTF-8" as candidate.
---
 lisp/net/tramp-sh.el |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 2c2179e..c1df1c6 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4149,7 +4149,8 @@ seconds.  If not, it produces an error message with the 
given ERROR-ARGS."
   "Set up an interactive shell.
 Mainly sets the prompt and the echo correctly.  PROC is the shell
 process to set up.  VEC specifies the connection."
-  (let ((tramp-end-of-output tramp-initial-end-of-output))
+  (let ((tramp-end-of-output tramp-initial-end-of-output)
+       (case-fold-search t))
     (tramp-open-shell vec (tramp-get-method-parameter vec 'tramp-remote-shell))
 
     ;; Disable tab and echo expansion.
@@ -4182,7 +4183,7 @@ process to set up.  VEC specifies the connection."
        ;; Use MULE to select the right EOL convention for communicating
        ;; with the process.
        (let ((cs (or (and (memq 'utf-8 (coding-system-list))
-                          (string-match "utf8" (tramp-get-remote-locale vec))
+                          (string-match "utf-?8" (tramp-get-remote-locale vec))
                           (cons 'utf-8 'utf-8))
                      (tramp-compat-funcall 'process-coding-system proc)
                      (cons 'undecided 'undecided)))
@@ -5358,7 +5359,7 @@ Return ATTR."
 (defun tramp-get-remote-locale (vec)
   (with-tramp-connection-property vec "locale"
     (tramp-send-command vec "locale -a")
-    (let ((candidates '("en_US.utf8" "C.utf8"))
+    (let ((candidates '("en_US.utf8" "C.utf8" "en_US.UTF-8"))
          locale)
       (with-current-buffer (tramp-get-connection-buffer vec)
        (while candidates



reply via email to

[Prev in Thread] Current Thread [Next in Thread]