* nnmail.el (nnmail-article-group): Decode headers before running
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 26 Jan 2002 22:13:02 +0000 (22:13 +0000)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Sat, 26 Jan 2002 22:13:02 +0000 (22:13 +0000)
split rules over them.
(nnmail-mail-splitting-charset): New variable.

lisp/ChangeLog
lisp/nnmail.el

index 219f7db..cd05b2c 100644 (file)
@@ -1,5 +1,9 @@
 2002-01-26  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * nnmail.el (nnmail-article-group): Decode headers before running
+       split rules over them.
+       (nnmail-mail-splitting-charset): New variable.
+
        * smiley.el: Replaced with smiley-ems.el.
 
 2002-01-26  ShengHuo ZHU  <zsh@cs.rochester.edu>
index 8857595..69fa9f7 100644 (file)
@@ -478,6 +478,11 @@ parameter.  It should return nil, `warn' or `delete'."
   :group 'nnmail
   :type 'integer)
 
+(defcustom nnmail-mail-splitting-charset nil
+  "Default charset to be used when splitting incoming mail."
+  :group 'nnmail
+  :type 'symbol)
+
 ;;; Internal variables.
 
 (defvar nnmail-article-buffer " *nnmail incoming*"
@@ -993,6 +998,9 @@ FUNC will be called with the group name to determine the article number."
        (erase-buffer)
        ;; Copy the headers into the work buffer.
        (insert-buffer-substring obuf beg end)
+       ;; Decode MIME headers and charsets.
+       (let ((mail-parse-charset nnmail-mail-splitting-charset))
+         (mail-decode-encoded-word-region (point-min) (point-max)))
        ;; Fold continuation lines.
        (goto-char (point-min))
        (while (re-search-forward "\\(\r?\n[ \t]+\\)+" nil t)