Allow overriding charset in some decoding functions
[gnus] / lisp / mm-view.el
index 9512a41..48124f1 100644 (file)
                                  (match-end 2))))
                    (if (fboundp 'w3-coding-system-for-mime-charset)
                        (w3-coding-system-for-mime-charset bsubstr)
-                     (mm-charset-to-coding-system bsubstr))))
+                     (mm-charset-to-coding-system bsubstr nil t))))
            (delete-region (point-min) (point-max))
            (insert (mm-decode-string text charset))))
        (save-window-excursion
                                                'charset)
                         (symbol-name mail-parse-charset)))
            cs)
-       (unless (and charset
-                    (setq cs (mm-charset-to-coding-system charset))
-                    (not (eq cs 'ascii)))
+       (if (and charset
+                (setq cs (mm-charset-to-coding-system charset nil t))
+                (not (eq cs 'ascii)))
+           (setq charset (format "%s" (mm-coding-system-to-mime-charset cs)))
          ;; The default.
          (setq charset "iso-8859-1"
                cs 'iso-8859-1))