X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lisp%2Fgnus-art.el;h=3320d868c3458f42b442108526a429b7203162ab;hb=8bfb9aaa1bde426dec8a497db2e322b6bc1fcbb4;hp=bab415b4b3836a5b48016d44cc27b610d5a7e573;hpb=95ed32a1535349f9ddb6d65152708463b20f5eb3;p=elisp%2Fgnus.git- diff --git a/lisp/gnus-art.el b/lisp/gnus-art.el index bab415b..3320d86 100644 --- a/lisp/gnus-art.el +++ b/lisp/gnus-art.el @@ -929,8 +929,23 @@ characters to translate to." (defun gnus-article-decode-rfc1522 () "Decode MIME encoded-words in header fields." (let (buffer-read-only) - (eword-decode-header) - )) + (let ((charset (save-excursion + (set-buffer gnus-summary-buffer) + default-mime-charset))) + (save-restriction + (std11-narrow-to-header) + (goto-char (point-min)) + (while (re-search-forward "^[^ \t:]+:" nil t) + (let ((start (match-beginning 0)) + (end (std11-field-end)) + ) + (save-restriction + (narrow-to-region start end) + (decode-mime-charset-region start end charset) + (goto-char (point-max)) + ))) + (eword-decode-header) + )))) (defun article-hide-pgp (&optional arg) "Toggle hiding of any PGP headers and signatures in the current article.