(gnus-group-name-charset): Always return `utf-7' when decoding nnimap groups.
authorLars Magne Ingebrigtsen <larsi@stories.gnus.org>
Sat, 10 Sep 2011 22:40:54 +0000 (00:40 +0200)
committerLars Magne Ingebrigtsen <larsi@stories.gnus.org>
Sat, 10 Sep 2011 22:40:54 +0000 (00:40 +0200)
lisp/ChangeLog
lisp/gnus-group.el
lisp/gnus-srvr.el

index 3280df0..fcc228d 100644 (file)
@@ -1,5 +1,8 @@
 2011-09-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
 2011-09-10  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
+       * gnus-group.el (gnus-group-name-charset): Always return `utf-7' when
+       decoding nnimap groups.
+
        * gnus.el (gnus-variable-list): Don't save `gnus-format-specs' in the
        newsrc file.  It doesn't seem like an important optimisation any more.
 
        * gnus.el (gnus-variable-list): Don't save `gnus-format-specs' in the
        newsrc file.  It doesn't seem like an important optimisation any more.
 
index bf83fd7..4921fa3 100644 (file)
@@ -1193,7 +1193,7 @@ The following commands are available:
   (unless (eq major-mode 'gnus-group-mode)
     (gnus-group-mode)))
 
   (unless (eq major-mode 'gnus-group-mode)
     (gnus-group-mode)))
 
-(defun gnus-group-name-charset (method group)
+(defun gnus-group-name-charset (method group &optional always-charset-p)
   (unless method
     (setq method (gnus-find-method-for-group group)))
   (when (stringp method)
   (unless method
     (setq method (gnus-find-method-for-group group)))
   (when (stringp method)
@@ -1201,7 +1201,9 @@ The following commands are available:
   (if (eq (car method) 'nnimap)
       ;; IMAP groups should not be encoded, since they do the encoding
       ;; in utf7 in the protocol.
   (if (eq (car method) 'nnimap)
       ;; IMAP groups should not be encoded, since they do the encoding
       ;; in utf7 in the protocol.
-      nil
+      (if always-charset-p
+         'utf-7
+       nil)
     (let ((item (or (assoc method gnus-group-name-charset-method-alist)
                    (and (consp method)
                         (assoc (list (car method) (cadr method))
     (let ((item (or (assoc method gnus-group-name-charset-method-alist)
                    (and (consp method)
                         (assoc (list (car method) (cadr method))
index ec98b2f..7fcdb20 100644 (file)
@@ -860,7 +860,7 @@ claim them."
                            name
                          (mm-decode-coding-string
                           name
                            name
                          (mm-decode-coding-string
                           name
-                          (inline (gnus-group-name-charset method name)))))))
+                          (inline (gnus-group-name-charset method name t)))))))
             (list 'gnus-group name)
             )))
        (switch-to-buffer (current-buffer)))
             (list 'gnus-group name)
             )))
        (switch-to-buffer (current-buffer)))