aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorMichael Albinus2016-01-09 13:55:02 +0100
committerMichael Albinus2016-01-09 13:55:02 +0100
commit90fd798aacbf92a330cf43d2670479499daf3fb1 (patch)
treeb4be06f61e63aea068c3d2a4598d77732bc9b3fa /lisp
parente985a0e9eed9542716c4c03e0e9a1a973de97a7a (diff)
downloademacs-90fd798aacbf92a330cf43d2670479499daf3fb1.tar.gz
emacs-90fd798aacbf92a330cf43d2670479499daf3fb1.zip
Fix coding system for Tramp on OS X.
* lisp/net/tramp-compat.el: Require ucs-normalize. * lisp/net/tramp-sh.el (tramp-open-connection-setup-interactive-shell): Set coding system to `utf-8-hfs' for Mac OS X. * test/automated/tramp-tests.el (tramp-test29-vc-registered): Flush directory properties when needed. (tramp--test-utf8): Include Chinese file name, again.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/net/tramp-compat.el2
-rw-r--r--lisp/net/tramp-sh.el14
2 files changed, 11 insertions, 5 deletions
diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el
index c6de1837e9a..44923aee895 100644
--- a/lisp/net/tramp-compat.el
+++ b/lisp/net/tramp-compat.el
@@ -56,6 +56,8 @@
56 (require 'custom) 56 (require 'custom)
57 (require 'format-spec) 57 (require 'format-spec)
58 (require 'shell) 58 (require 'shell)
59 ;; Introduced in Emacs 23.2.
60 (require 'ucs-normalize nil 'noerror)
59 61
60 (require 'trampver) 62 (require 'trampver)
61 (require 'tramp-loaddefs) 63 (require 'tramp-loaddefs)
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index ca0707f5941..1357db0ac42 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -4214,10 +4214,8 @@ process to set up. VEC specifies the connection."
4214 (cons 'undecided 'undecided))) 4214 (cons 'undecided 'undecided)))
4215 cs-decode cs-encode) 4215 cs-decode cs-encode)
4216 (when (symbolp cs) (setq cs (cons cs cs))) 4216 (when (symbolp cs) (setq cs (cons cs cs)))
4217 (setq cs-decode (car cs)) 4217 (setq cs-decode (or (car cs) 'undecided)
4218 (setq cs-encode (cdr cs)) 4218 cs-encode (or (cdr cs) 'undecided))
4219 (unless cs-decode (setq cs-decode 'undecided))
4220 (unless cs-encode (setq cs-encode 'undecided))
4221 (setq cs-encode 4219 (setq cs-encode
4222 (tramp-compat-coding-system-change-eol-conversion 4220 (tramp-compat-coding-system-change-eol-conversion
4223 cs-encode 4221 cs-encode
@@ -4229,7 +4227,13 @@ process to set up. VEC specifies the connection."
4229 (when (search-forward "\r" nil t) 4227 (when (search-forward "\r" nil t)
4230 (setq cs-decode (tramp-compat-coding-system-change-eol-conversion 4228 (setq cs-decode (tramp-compat-coding-system-change-eol-conversion
4231 cs-decode 'dos))) 4229 cs-decode 'dos)))
4232 (tramp-compat-funcall 4230 ;; Special setting for Mac OS X.
4231 (when (and (string-match
4232 "^Darwin" (tramp-get-connection-property vec "uname" ""))
4233 (memq 'utf-8-hfs (coding-system-list)))
4234 (setq cs-decode 'utf-8-hfs
4235 cs-encode 'utf-8-hfs))
4236 (tramp-compat-funcall
4233 'set-buffer-process-coding-system cs-decode cs-encode) 4237 'set-buffer-process-coding-system cs-decode cs-encode)
4234 (tramp-message 4238 (tramp-message
4235 vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode)) 4239 vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode))