From: yamaoka Date: Mon, 23 Jan 2006 04:41:31 +0000 (+0000) Subject: Synch to No Gnus 200601230440. X-Git-Tag: t-gnus-6_17_4-quimby-~142 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eba054ec40ef50f68718b99bff238e17e9d51945;p=elisp%2Fgnus.git- Synch to No Gnus 200601230440. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 2df51c8..fae2be9 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-01-23 Katsumi Yamaoka + + * mm-uu.el (mm-uu-dissect-text-parts): Decode content transfer + encoding. + 2006-01-20 Reiner Steib * message.el (message-tool-bar-zap-list, message-tool-bar) diff --git a/lisp/mm-uu.el b/lisp/mm-uu.el index ec51314..e518993 100644 --- a/lisp/mm-uu.el +++ b/lisp/mm-uu.el @@ -620,24 +620,32 @@ value of `mm-uu-text-plain-type'." (defun mm-uu-dissect-text-parts (handle) "Dissect text parts and put uu handles into HANDLE." - (let ((buffer (mm-handle-buffer handle)) - (case-fold-search t) - type children) + (let ((buffer (mm-handle-buffer handle))) (cond ((stringp buffer) (mapc 'mm-uu-dissect-text-parts (cdr handle))) ((bufferp buffer) - (when (and (setq type (mm-handle-media-type handle)) - (stringp type) - ;; Mutt still uses application/pgp even though - ;; it has already been withdrawn. - (string-match "\\`text/\\|\\`application/pgp\\'" type) - (with-current-buffer buffer - (setq children - (mm-uu-dissect t (mm-handle-type handle))))) - (kill-buffer buffer) - (setcar handle (car children)) - (setcdr handle (cdr children)) - (mm-uu-dissect-text-parts handle))) + (let ((type (mm-handle-media-type handle)) + (case-fold-search t) ;; string-match + encoding children) + (when (and + (stringp type) + ;; Mutt still uses application/pgp even though + ;; it has already been withdrawn. + (string-match "\\`text/\\|\\`application/pgp\\'" type) + (setq children + (with-current-buffer buffer + (if (setq encoding (mm-handle-encoding handle)) + ;; Inherit the multibyteness of the `buffer'. + (with-temp-buffer + (insert-buffer-substring buffer) + (mm-decode-content-transfer-encoding + encoding type) + (mm-uu-dissect t (mm-handle-type handle))) + (mm-uu-dissect t (mm-handle-type handle)))))) + (kill-buffer buffer) + (setcar handle (car children)) + (setcdr handle (cdr children)) + (mm-uu-dissect-text-parts handle)))) (t (mapc 'mm-uu-dissect-text-parts handle)))))