(gb2312 . base64)
(cn-gb . base64)
(cn-gb-2312 . base64)
- (euc-kr . base64)
+ (euc-kr . 8bit)
(iso-2022-jp-2 . base64)
(iso-2022-int-1 . base64))
"Alist of MIME charsets to encodings.
((eq encoding 'quoted-printable)
(quoted-printable-decode-region (point-min) (point-max)))
((eq encoding 'base64)
- (base64-decode-region (point-min) (point-max)))
+ (base64-decode-region (point-min)
+ ;; Some mailers insert whitespace
+ ;; junk at the end which
+ ;; base64-decode-region dislikes.
+ (save-excursion
+ (goto-char (point-max))
+ (skip-chars-backward "\n\t ")
+ (point))))
((memq encoding '(7bit 8bit binary))
)
((null encoding)
)
- ((eq encoding 'x-uuencode)
+ ((memq encoding '(x-uuencode x-uue))
(funcall mm-uu-decode-function (point-min) (point-max)))
((eq encoding 'x-binhex)
(funcall mm-uu-binhex-decode-function (point-min) (point-max)))
(message "Error while decoding: %s" error)
nil))
(when (and
- (memq encoding '(base64 x-uuencode x-binhex))
+ (memq encoding '(base64 x-uuencode x-uue x-binhex))
(equal type "text/plain"))
(goto-char (point-min))
(while (search-forward "\r\n" nil t)