+2013-02-22 Michael Albinus <michael.albinus@gmx.de>
+
+ * net/tramp.el (tramp-tramp-file-p): Fix docstring.
+
+ * net/tramp-sh.el (tramp-sh-handle-insert-directory): Handle
+ multibyte file names.
+
2013-02-22 Glenn Morris <rgm@gnu.org>
* textmodes/sgml-mode.el (sgml-xml-mode): Move before use.
(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 "%s %s %s 2>/dev/null"
+ (format "env LC_ALL=en_US.UTF8 LC_CTYPE='' %s %s %s 2>/dev/null"
(tramp-get-ls-command v)
switches
(if wildcard
(tramp-run-real-handler 'file-name-directory (list localname))))
(tramp-send-command
v
- (format "%s %s %s"
+ (format "env LC_ALL=en_US.UTF8 LC_CTYPE='' %s %s %s"
(tramp-get-ls-command v)
switches
(if (or wildcard
(while (re-search-forward tramp-color-escape-sequence-regexp nil t)
(replace-match "")))
+ ;; Decode the output, it could be multibyte.
+ (decode-coding-region
+ beg (point-max)
+ (or file-name-coding-system default-file-name-coding-system))
+
;; The inserted file could be from somewhere else.
(when (and (not wildcard) (not full-directory-p))
(goto-char (point-max))
;;;###tramp-autoload
(defun tramp-tramp-file-p (name)
- "Return t if NAME is a string with Tramp file name syntax.
-It checks also, whether NAME is unibyte encoded."
+ "Return t if NAME is a string with Tramp file name syntax."
(save-match-data
(and (stringp name)
-; (string-equal name (string-as-unibyte name))
(string-match tramp-file-name-regexp name))))
(defun tramp-find-method (method user host)
(get-buffer-create (tramp-debug-buffer-name vec))
(when (bobp)
(setq buffer-undo-list t)
- ;; So it does not get loaded while outline-regexp is let-bound.
+ ;; So it does not get loaded while `outline-regexp' is let-bound.
(require 'outline)
;; Activate `outline-mode'. This runs `text-mode-hook' and
;; `outline-mode-hook'. We must prevent that local processes