]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix problem with non-ASCII characters in ediff error messages
authorLars Ingebrigtsen <larsi@gnus.org>
Thu, 20 Aug 2020 20:23:35 +0000 (22:23 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Thu, 20 Aug 2020 20:23:35 +0000 (22:23 +0200)
* lisp/vc/ediff-diff.el (ediff-prepare-error-list): Decode the
data from diff before displaying (bug#5050).  This fixes a problem
with displaying raw bytes in the error messages in non-ASCII locales.

lisp/vc/ediff-diff.el

index ef466741b24e9f4f784125a33dc759be05b850a9..ccf5a7807f2ea1fb99deb4d9379b3f7ea6b21640 100644 (file)
@@ -325,6 +325,10 @@ one optional arguments, diff-number to refine.")
            (error-buf ediff-error-buffer))
        (ediff-skip-unsuitable-frames)
        (switch-to-buffer error-buf)
+        ;; We output data from the diff command using `raw-text' as
+        ;; the coding system, so decode before displaying.
+        (when (eq ediff-coding-system-for-read 'raw-text)
+          (decode-coding-region (point-min) (point-max) 'undecided))
        (ediff-kill-buffer-carefully ctl-buf)
        (user-error "Errors in diff output.  Diff output is in %S" diff-buff))))