# HG changeset patch # User Henrik Enberg # Date 1177709559 0 # Node ID 4fd331e58549317fd68b562f3fbb75421c4a734a # Parent a66359380d2d11543ace399454ac244cacede05e (rmail-output): Bind buffer-file-coding-system even when rmail-enable-mime is nil. diff -r a66359380d2d -r 4fd331e58549 lisp/mail/rmailout.el --- a/lisp/mail/rmailout.el Fri Apr 27 20:00:56 2007 +0000 +++ b/lisp/mail/rmailout.el Fri Apr 27 21:32:39 2007 +0000 @@ -169,6 +169,10 @@ (while (> count 0) (with-temp-buffer (insert-buffer-substring rmailbuf) + ;; ensure we can write without barfing on exotic characters + (setq buffer-file-coding-system + (or rmail-file-coding-system 'raw-text)) + ;; prune junk headers (rmail-delete-unwanted-fields) (if (not destbuf) ;; The destination file is not being visited, just write