2002-02-21   Daiki Ueno  <ueno@unixuser.org>
 
+       * lisp/gnus-group.el (gnus-group-name-encode): New function.
+       (gnus-group-encoded-name): New function.
+       (gnus-group-completing-read-group-name): New function.
+       (gnus-fetch-group): Use it.
+       (gnus-group-jump-to-group): Use it.
+       (gnus-group-unsubscribe-current-group): Use it.
+
+2002-02-21   Daiki Ueno  <ueno@unixuser.org>
+
        * lisp/nnheader.el (mm-string-as-unibyte): Undo the last change.
        * lisp/gnus-srvr.el (gnus-browse-foreign-server): Ditto.
 
 
   (let ((charset (gnus-group-name-charset nil string)))
     (gnus-group-name-decode string charset)))
 
+(defun gnus-group-name-encode (string charset)
+  (if (and string charset (featurep 'mule))
+      (encode-coding-string string charset)
+    string))
+
+(defun gnus-group-encoded-name (string)
+  (let ((charset (gnus-group-name-charset nil string)))
+    (gnus-group-name-encode string charset)))
+
+(defun gnus-group-completing-read-group-name
+  (prompt table &optional predicate require-match initial-contents history)
+  (if (vectorp table)
+      (let ((decoded-table (make-vector (length table) 0)))
+       (mapatoms
+        (lambda (atom)
+          (set (intern (gnus-group-decoded-name (symbol-name atom))
+                       decoded-table)
+               (symbol-value atom)))
+        table)
+       (setq table decoded-table))
+    (setq table (mapcar
+                (lambda (entry)
+                  (cons (gnus-group-decoded-name
+                         (car entry))
+                        (cdr entry)))
+                table)))
+  (gnus-group-encoded-name
+   (completing-read
+    prompt table predicate
+    require-match
+    initial-contents
+    history)))
+
 (defun gnus-group-list-groups (&optional level unread lowest)
   "List newsgroups with level LEVEL or lower that have unread articles.
 Default is all subscribed groups.
 (defun gnus-fetch-group (group)
   "Start Gnus if necessary and enter GROUP.
 Returns whether the fetching was successful or not."
-  (interactive (list (completing-read "Group name: " gnus-active-hashtb)))
+  (interactive (list (gnus-group-completing-read-group-name
+                     "Group name: " gnus-active-hashtb)))
   (unless (get-buffer gnus-group-buffer)
     (gnus-no-server))
   (gnus-group-read-group nil nil group))
 (defun gnus-group-jump-to-group (group)
   "Jump to newsgroup GROUP."
   (interactive
-   (list (completing-read
+   (list (gnus-group-completing-read-group-name
          "Group: " gnus-active-hashtb nil
          (gnus-read-active-file-p)
          gnus-group-jump-to-group-prompt
 Killed newsgroups are subscribed.  If SILENT, don't try to update the
 group line."
   (interactive
-   (list (completing-read
+   (list (gnus-group-completing-read-group-name
          "Group: " gnus-active-hashtb nil
          (gnus-read-active-file-p)
          nil