From e675b3e45242e65a4cab9271566ad9141a81036f Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Fri, 15 Nov 2013 08:37:18 +0100 Subject: [PATCH] * net/tramp-sh.el (tramp-remote-process-environment): Set "LC_ALL" to "en_US.utf8" and "LC_CTYPE" to "". (tramp-maybe-open-connection): Set "LC_ALL" to "en_US.utf8". (tramp-sh-handle-insert-directory): Don't set "LC_ALL" and "LC_CTYPE". --- lisp/ChangeLog | 9 ++++++++- lisp/net/tramp-sh.el | 14 ++++++-------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e3eb6da2f71..322934fac8c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2013-11-15 Michael Albinus + + * net/tramp-sh.el (tramp-remote-process-environment): Set "LC_ALL" to + "en_US.utf8" and "LC_CTYPE" to "". + (tramp-maybe-open-connection): Set "LC_ALL" to "en_US.utf8". + (tramp-sh-handle-insert-directory): Don't set "LC_ALL" and "LC_CTYPE". + 2013-11-15 Leo Liu * loadhist.el (read-feature): Get rid of fake feature nil. (Bug#15889) @@ -55,7 +62,7 @@ 2013-11-13 Michael Albinus - * net/tramp.el (tramp-remote-file-name-spec-regexp): An IPV6 + * net/tramp.el (tramp-remote-file-name-spec-regexp): An IPv6 address can be empty. * net/tramp-gvfs.el (tramp-gvfs-handle-insert-directory): diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 8bed62d7190..874e50fbfaa 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -419,7 +419,8 @@ as given in your `~/.profile'." ;;;###tramp-autoload (defcustom tramp-remote-process-environment - `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "TMOUT=0" "LC_ALL=C" + `("HISTFILE=$HOME/.tramp_history" "HISTSIZE=1" "TMOUT=0" + "LC_ALL=en_US.utf8" "LC_CTYPE=''" ,(format "TERM=%s" tramp-terminal-type) "EMACS=t" ;; Deprecated. ,(format "INSIDE_EMACS='%s,tramp:%s'" emacs-version tramp-version) @@ -2518,13 +2519,10 @@ This is like `dired-recursive-delete-directory' for Tramp files." (if full-directory-p "yes" "no")) ;; If `full-directory-p', we just say `ls -l FILENAME'. ;; Else we chdir to the parent directory, then say `ls -ld BASENAME'. - ;; "--dired" returns byte positions. Therefore, the file names - ;; must be encoded, which is guaranteed by "LC_ALL=en_US.utf8 - ;; LC_CTYPE=''". (if full-directory-p (tramp-send-command v - (format "env LC_ALL=en_US.utf8 LC_CTYPE='' %s %s %s 2>/dev/null" + (format "%s %s %s 2>/dev/null" (tramp-get-ls-command v) switches (if wildcard @@ -2540,7 +2538,7 @@ This is like `dired-recursive-delete-directory' for Tramp files." (tramp-run-real-handler 'file-name-directory (list localname)))) (tramp-send-command v - (format "env LC_ALL=en_US.utf8 LC_CTYPE='' %s %s %s 2>/dev/null" + (format "%s %s %s 2>/dev/null" (tramp-get-ls-command v) switches (if (or wildcard @@ -4369,7 +4367,7 @@ connection if a previous connection has died for some reason." (when (and p (processp p)) (delete-process p)) (setenv "TERM" tramp-terminal-type) - (setenv "LC_ALL" "C") + (setenv "LC_ALL" "en_US.utf8") (setenv "PROMPT_COMMAND") (setenv "PS1" tramp-initial-end-of-output) (let* ((target-alist (tramp-compute-multi-hops vec)) @@ -4479,7 +4477,7 @@ connection if a previous connection has died for some reason." tramp-current-user (or g-user l-user) tramp-current-host (or g-host l-host)) - ;; Replace login-args place holders. + ;; Replace `login-args' place holders. (setq l-host (or l-host "") l-user (or l-user "") -- 2.39.2