- (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))))))
+ (setq
+ children
+ (with-current-buffer buffer
+ (cond
+ ((or decoded
+ (eq (setq charset (mail-content-type-get
+ (mm-handle-type handle)
+ 'charset))
+ 'gnus-decoded))
+ (mm-uu-dissect
+ t (cons type '((charset . gnus-decoded)))))
+ (charset
+ (setq decoded t)
+ (mm-with-multibyte-buffer
+ (insert (mm-decode-string (mm-get-part handle)
+ charset))
+ (mm-uu-dissect
+ t (cons type '((charset . gnus-decoded))))))
+ ((setq encoding (mm-handle-encoding handle))
+ (setq decoded nil)
+ ;; Inherit the multibyteness of the `buffer'.
+ (with-temp-buffer
+ (insert-buffer-substring buffer)
+ (mm-decode-content-transfer-encoding
+ encoding type)
+ (mm-uu-dissect t (list type))))
+ (t
+ (setq decoded nil)
+ (mm-uu-dissect t (list type)))))))