Commit 90fd798a authored by Michael Albinus's avatar Michael Albinus
Browse files

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.
parent e985a0e9
......@@ -56,6 +56,8 @@
(require 'custom)
(require 'format-spec)
(require 'shell)
;; Introduced in Emacs 23.2.
(require 'ucs-normalize nil 'noerror)
(require 'trampver)
(require 'tramp-loaddefs)
......@@ -4214,10 +4214,8 @@ process to set up. VEC specifies the connection."
(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))
(unless cs-decode (setq cs-decode 'undecided))
(unless cs-encode (setq cs-encode 'undecided))
(setq cs-decode (or (car cs) 'undecided)
cs-encode (or (cdr cs) 'undecided))
(setq cs-encode
......@@ -4229,7 +4227,13 @@ process to set up. VEC specifies the connection."
(when (search-forward "\r" nil t)
(setq cs-decode (tramp-compat-coding-system-change-eol-conversion
cs-decode 'dos)))
;; Special setting for Mac OS X.
(when (and (string-match
"^Darwin" (tramp-get-connection-property vec "uname" ""))
(memq 'utf-8-hfs (coding-system-list)))
(setq cs-decode 'utf-8-hfs
cs-encode 'utf-8-hfs))
'set-buffer-process-coding-system cs-decode cs-encode)
vec 5 "Setting coding system to `%s' and `%s'" cs-decode cs-encode))
......@@ -1658,6 +1658,10 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'."
nil (list (car vc-handled-backends)
(list (file-name-nondirectory tmp-name2))))))
;; vc-git uses an own process sentinel, Tramp's sentinel
;; for flushing the cache isn't used.
(with-parsed-tramp-file-name tmp-name1 nil
(tramp-flush-directory-property v localname))
(should (vc-registered (file-name-nondirectory tmp-name2)))))
;; Cleanup.
......@@ -2044,8 +2048,7 @@ Use the `ls' command."
(unless (tramp--test-hpux-p) "Γυρίστε το Γαλαξία με Ώτο Στοπ")
(unless (or (tramp--test-hpux-p) (tramp--test-darwin-p))
"أصبح بوسعك الآن تنزيل نسخة كاملة من موسوعة ويكيبيديا العربية لتصفحها بلا اتصال بالإنترنت")
(unless (tramp--test-darwin-p)
"Автостопом по гала́ктике")))
(ert-deftest tramp-test32-utf8 ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment