(mm-uu-pgp-signed-extract-1): Use buffer-file-coding-system if set.
[gnus] / contrib / compface.el
index 83d6f9a..4408af4 100644 (file)
@@ -9,7 +9,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -80,11 +80,12 @@ or `libgr-progs', for instance."
         (uncompface-internal face))
        ((eq uncompface-use-external t)
         (with-temp-buffer
+          (unless (featurep 'xemacs) (set-buffer-multibyte nil))
           (insert face)
           (let ((coding-system-for-read 'raw-text)
                 ;; At least "icontopbm" doesn't work with Windows because
                 ;; the line-break code is converted into CRLF by default.
-                (coding-system-for-write 'raw-text-unix))
+                (coding-system-for-write 'binary))
             (and (eq 0 (apply 'call-process-region (point-min) (point-max)
                               "uncompface"
                               'delete '(t nil) nil))