bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

fix for Gnus encoding lossage


From: Dave Love
Subject: fix for Gnus encoding lossage
Date: 04 Nov 2001 14:55:57 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.0.107

This fixes a problem with, say, an application/emacs-lisp mime part
being wrongly encoded due to decoding raw text into a multibyte
buffer.  (I suspect the buffer shouldn't be multibyte in the first
place, but this is an obvious safe fix.)

This happens for such a type but not for text because when attaching a
.el file with the default mime type it picks up a transfer encoding of
8bit from `mm-content-transfer-encoding-defaults'; that looks wrong to
me per se.

Index: mml.el
===================================================================
RCS file: /cvs/emacs/lisp/gnus/mml.el,v
retrieving revision 1.10
diff -u -p -c -r1.10 mml.el
cvs server: conflicting specifications of output style
*** mml.el      2001/07/15 17:42:53     1.10
--- mml.el      2001/11/04 14:40:50
*************** If MML is non-nil, return the buffer up 
*** 356,362 ****
                  coded (buffer-string))))
        (mml-insert-mime-headers cont type charset encoding)
        (insert "\n")
!       (insert coded)))
       ((eq (car cont) 'external)
        (insert "Content-Type: message/external-body")
        (let ((parameters (mml-parameter-string
--- 356,367 ----
                  coded (buffer-string))))
        (mml-insert-mime-headers cont type charset encoding)
        (insert "\n")
!       ;; Fixme: I don't see any reason not to insert the text
!       ;; directly into this buffer, then insert the header before
!       ;; it, rather than using buffer-string of a new buffer above.
!       ;; -- fx
!       (mm-with-unibyte-current-buffer
!         (insert coded))))
       ((eq (car cont) 'external)
        (insert "Content-Type: message/external-body")
        (let ((parameters (mml-parameter-string



reply via email to

[Prev in Thread] Current Thread [Next in Thread]