Commit 14ce5fc2 authored by Katsumi Yamaoka's avatar Katsumi Yamaoka
Browse files

* gnus-art.el (gnus-mime-strip-charset-parameters): Remove.

(gnus-mime-set-charset-parameters): New function.
(gnus-mime-view-part-as-charset): Use it to correctly display part
specifying wrong charset.
parent da2cf488
2008-09-09 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-art.el (gnus-mime-strip-charset-parameters): Remove.
(gnus-mime-set-charset-parameters): New function.
(gnus-mime-view-part-as-charset): Use it to correctly display part
specifying wrong charset.
2008-09-08 David Engster <dengste@eml.cc> 2008-09-08 David Engster <dengste@eml.cc>
* nnmairix.el (nnmairix-create-server-and-default-group): Require match * nnmairix.el (nnmairix-create-server-and-default-group): Require match
......
...@@ -5138,8 +5138,9 @@ Compressed files like .gz and .bz2 are decompressed." ...@@ -5138,8 +5138,9 @@ Compressed files like .gz and .bz2 are decompressed."
(mm-string-to-multibyte contents))) (mm-string-to-multibyte contents)))
(goto-char b))))) (goto-char b)))))
(defun gnus-mime-strip-charset-parameters (handle) (defun gnus-mime-set-charset-parameters (handle)
"Strip charset parameters from HANDLE." "Set charset to parameters in HANDLE.
The value of `gnus-newsgroup-charset' is used as a charset."
(if (stringp (car handle)) (if (stringp (car handle))
(mapc #'gnus-mime-strip-charset-parameters (cdr handle)) (mapc #'gnus-mime-strip-charset-parameters (cdr handle))
(let* ((type (mm-handle-type (if (equal (mm-handle-media-type handle) (let* ((type (mm-handle-type (if (equal (mm-handle-media-type handle)
...@@ -5150,8 +5151,10 @@ Compressed files like .gz and .bz2 are decompressed." ...@@ -5150,8 +5151,10 @@ Compressed files like .gz and .bz2 are decompressed."
(mm-handle-cache handle)) (mm-handle-cache handle))
handle))) handle)))
(charset (assq 'charset (cdr type)))) (charset (assq 'charset (cdr type))))
(when charset (if charset
(delq charset type))))) (setcdr charset (symbol-name gnus-newsgroup-charset))
(setcdr type (cons (cons 'charset (symbol-name gnus-newsgroup-charset))
(cdr type)))))))
(defun gnus-mime-view-part-as-charset (&optional handle arg) (defun gnus-mime-view-part-as-charset (&optional handle arg)
"Insert the MIME part under point into the current buffer using the "Insert the MIME part under point into the current buffer using the
...@@ -5172,7 +5175,7 @@ specified charset." ...@@ -5172,7 +5175,7 @@ specified charset."
(mm-read-coding-system "Charset: ")))) (mm-read-coding-system "Charset: "))))
(if (mm-handle-undisplayer handle) (if (mm-handle-undisplayer handle)
(mm-remove-part handle))) (mm-remove-part handle)))
(gnus-mime-strip-charset-parameters handle) (gnus-mime-set-charset-parameters handle)
(when (and (consp (setq form (cdr-safe fun))) (when (and (consp (setq form (cdr-safe fun)))
(setq form (ignore-errors (setq form (ignore-errors
(assq 'gnus-mime-display-alternative form))) (assq 'gnus-mime-display-alternative form)))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment