]> code.delx.au - gnu-emacs/blobdiff - lisp/ediff-diff.el
newsticker fixes: cachefile, layout changes.
[gnu-emacs] / lisp / ediff-diff.el
index ec9bf24c493e42136e281364df7d638c343f8331..2dd34a9f512bd1140e3cfc1d614443e679215252 100644 (file)
@@ -1207,7 +1207,13 @@ delimiter regions"))
 ;; 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