Function: gnus-group-name-charset

gnus-group-name-charset is an autoloaded and byte-compiled function defined in gnus-group.el.gz.

Signature

(gnus-group-name-charset METHOD GROUP)

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-group.el.gz
;; FIXME: If we never have to coerce group names to unibyte now, how
;; much of this is necessary?  How much encoding/decoding do we still
;; have to do?
(defun gnus-group-name-charset (method group)
  (unless method
    (setq method (gnus-find-method-for-group group)))
  (when (stringp method)
    (setq method (gnus-server-to-method method)))
  (if (eq (car method) 'nnimap)
      ;; IMAP groups should not be encoded, since they do the encoding
      ;; in utf7 in the protocol.
      'utf-8
    (let ((item (or (assoc method gnus-group-name-charset-method-alist)
		    (and (consp method)
			 (assoc (list (car method) (cadr method))
				gnus-group-name-charset-method-alist))))
	  (alist gnus-group-name-charset-group-alist)
	  result)
      (if item
	  (cdr item)
	(while (setq item (pop alist))
	  (if (string-match (car item) group)
	      (setq alist nil
		    result (cdr item))))
	result))))