+2003-03-15 Jesper Harder <harder@ifa.au.dk>
+
+ * mm-bodies.el (mm-decode-body): Add new optional parameter,
+ force, to use the supplied charset unconditionally.
+
+ * gnus-art.el (article-decode-charset): Use it.
+
2003-03-14 Jesper Harder <harder@ifa.au.dk>
* mm-bodies.el (mm-decode-coding-region-safely): New function.
(mm-decode-body
charset (and cte (intern (downcase
(gnus-strip-whitespace cte))))
- (car ctl)))))))
+ (car ctl) prompt))))))
(defun article-decode-encoded-words ()
"Remove encoded-word encoding from headers."
(while (search-forward "\r\n" nil t)
(replace-match "\n" t t)))))
-(defun mm-decode-body (charset &optional encoding type)
+(defun mm-decode-body (charset &optional encoding type force)
"Decode the current article that has been encoded with ENCODING.
-The characters in CHARSET should then be decoded."
+The characters in CHARSET should then be decoded. If FORCE is non-nil
+use the supplied charset unconditionally."
(if (stringp charset)
(setq charset (intern (downcase charset))))
(if (or (not charset)
(or (not (eq coding-system 'ascii))
(setq coding-system mail-parse-charset))
(not (eq coding-system 'gnus-decoded)))
- (mm-decode-coding-region-safely (point-min) (point-max)
- coding-system))))))
+ (if force
+ (mm-decode-coding-region (point-min) (point-max)
+ coding-system)
+ (mm-decode-coding-region-safely (point-min) (point-max)
+ coding-system)))))))
(defun mm-decode-coding-region-safely (start end coding-system)
"Decode region between START and END with CODING-SYSTEM.