From 8bfb9aaa1bde426dec8a497db2e322b6bc1fcbb4 Mon Sep 17 00:00:00 2001 From: morioka Date: Mon, 16 Feb 1998 16:54:46 +0000 Subject: [PATCH] (gnus-article-decode-rfc1522): Decode header by localized code. --- lisp/gnus-art.el | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) 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. -- 1.7.10.4