changeset 98857:b32a6a932f4a

(ediff-exec-process): For buffer jobs, bind coding-system-for-read to ediff-coding-system-for-write.
author Eli Zaretskii <eliz@gnu.org>
date Sun, 19 Oct 2008 08:25:52 +0000
parents 8559c6826b7e
children 0247eb23156a
files lisp/ediff-diff.el
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ediff-diff.el	Sun Oct 19 08:25:25 2008 +0000
+++ b/lisp/ediff-diff.el	Sun Oct 19 08:25:52 2008 +0000
@@ -1207,7 +1207,13 @@
 ;; args.
 (defun ediff-exec-process (program buffer synch options &rest files)
   (let ((data (match-data))
-	(coding-system-for-read ediff-coding-system-for-read)
+	;; If this is a buffer job, we are diffing temporary files
+	;; produced by Emacs with ediff-coding-system-for-write, so
+	;; use the same encoding to read the results.
+	(coding-system-for-read
+	 (if (string-match "buffer" (symbol-name ediff-job-name))
+	     ediff-coding-system-for-write
+	   ediff-coding-system-for-read))
 	args)
     (setq args (append (split-string options) files))
     (setq args (delete "" (delq nil args))) ; delete nil and "" from arguments