*** /tmp/ediff6YFuhU 2021-01-03 20:05:37.494401938 +0100 --- /home/albinus/src/tramp/lisp/tramp-sh.el 2021-01-03 20:00:33.533762951 +0100 *************** *** 2672,2678 **** (tramp-get-remote-null-device v)))) (save-restriction ! (let ((beg (point))) (narrow-to-region (point) (point)) ;; We cannot use `insert-buffer-substring' because the Tramp ;; buffer changes its contents before insertion due to calling --- 2672,2679 ---- (tramp-get-remote-null-device v)))) (save-restriction ! (let ((beg (point)) ! (emc enable-multibyte-characters)) (narrow-to-region (point) (point)) ;; We cannot use `insert-buffer-substring' because the Tramp ;; buffer changes its contents before insertion due to calling *************** *** 2681,2687 **** (with-current-buffer (tramp-get-buffer v) (buffer-string))) ! ;; Check for "--dired" output. (forward-line -2) (when (looking-at-p "//SUBDIRED//") (forward-line -1)) --- 2682,2690 ---- (with-current-buffer (tramp-get-buffer v) (buffer-string))) ! ;; Check for "--dired" output. We must enable unibyte ! ;; strings, because the "--dired" output counts in bytes. ! (set-buffer-multibyte nil) (forward-line -2) (when (looking-at-p "//SUBDIRED//") (forward-line -1)) *************** *** 2701,2706 **** --- 2704,2711 ---- (while (looking-at "//") (forward-line 1) (delete-region (match-beginning 0) (point))) + ;; Reset multibyte if needed. + (set-buffer-multibyte emc) ;; Some busyboxes are reluctant to discard colors. (unless