User: aidan
Date: 05/04/02 00:28:07
Modified: packages/xemacs-packages/mail-lib ChangeLog sendmail.el
Log:
Write FCCs to Unix mailboxes using the binary coding system, not the default
buffer-file-coding-system.
Revision Changes Path
1.158 +8 -0 XEmacs/packages/xemacs-packages/mail-lib/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/mail-lib/ChangeLog,v
retrieving revision 1.157
retrieving revision 1.158
diff -u -p -r1.157 -r1.158
--- ChangeLog 2005/03/09 20:23:00 1.157
+++ ChangeLog 2005/04/01 22:28:06 1.158
@@ -1,3 +1,11 @@
+2005-04-02 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * sendmail.el (mail-do-fcc): Write the Unix mail file using the
+ binary coding system, as is appropriate for a file where non-ASCII
+ characters are encoded using separate MIME character sets for
+ every message, and thus no other single Mule coding system is
+ appropriate.
+
2005-03-09 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.72 released.
1.19 +10 -2 XEmacs/packages/xemacs-packages/mail-lib/sendmail.el
Index: sendmail.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/mail-lib/sendmail.el,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -p -r1.18 -r1.19
--- sendmail.el 2004/11/08 02:50:32 1.18
+++ sendmail.el 2005/04/01 22:28:07 1.19
@@ -1225,8 +1225,16 @@ external program defined by `sendmail-pr
(insert "\n\C-_")
(write-region (point-min) (point-max) (car fcc-list) t)
(erase-buffer)))
- (write-region
- (1+ (point-min)) (point-max) (car fcc-list) t)))
+ ;; MIME processing should have eliminated any characters
+ ;; outside the range 0-255; if MIME processing hasn't been
+ ;; done, there's no reasonable expectation that the data will
+ ;; be preserved in a Unix mailbox, so we just write tildes for
+ ;; those chars. We set the coding system for write to 'binary
+ ;; to prevent any double-encoding that may occur if
+ ;; buffer-file-coding-system has been initialised to a
+ ;; non-binary-compatible coding system like, say, UTF-8.
+ (let ((coding-system-for-write 'binary))
+ (write-region (1+ (point-min)) (point-max) (car fcc-list) t))))
(and buffer (not dont-write-the-file)
(with-current-buffer buffer
(set-visited-file-modtime))))
Show replies by date