- (when (and (mail-fetch-field "mime-version")
- (setq ct (mail-fetch-field "content-type")))
- (setq cte (message-fetch-field "content-transfer-encoding" t)
- ctl (ignore-errors (mail-header-parse-content-type ct))
- charset (and ctl (mail-content-type-get ctl 'charset)))
- (if (stringp cte)
- (setq cte (intern (downcase (mail-header-remove-whitespace
- (mail-header-remove-comments
- cte))))))
- (if (memq cte '(base64 quoted-printable))
- (setq charset 'gnus-encoded ;; a fake charset
- cte nil)))