From: morioka Date: Mon, 16 Feb 1998 16:54:46 +0000 (+0000) Subject: (gnus-article-decode-rfc1522): Decode header by localized code. X-Git-Tag: gnus-6_7-tomo-199811302358~184 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8bfb9aaa1bde426dec8a497db2e322b6bc1fcbb4;p=elisp%2Fgnus.git- (gnus-article-decode-rfc1522): Decode header by localized code. --- 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.