|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]||[Top]||[Contents]||[Index]||[ ? ]|
There are some news servers that provide groups of which the names are
expressed with their native languages in the world. For instance, in a
certain news server there are some newsgroups of which the names are
spelled in Chinese, where people are talking in Chinese. You can, of
course, subscribe to such news groups using Gnus. Currently Gnus
supports non-ASCII group names not only with the
back end but also with the
nnml back end and the
Every such group name is encoded by a certain charset in the server side (in an NNTP server its administrator determines the charset, but for groups in the other back ends it is determined by you). Gnus has to display the decoded ones for you in the group buffer and the article buffer, and needs to use the encoded ones when communicating with servers. However, Gnus doesn’t know what charset is used for each non-ASCII group name. The following two variables are just the ones for telling Gnus what charset should be used for each group:
An alist of select methods and charsets. The default value is
nil. The names of groups in the server specified by that select
method are all supposed to use the corresponding charset. For example:
(setq gnus-group-name-charset-method-alist '(((nntp "news.com.cn") . cn-gb-2312)))
Charsets specified for groups with this variable are preferred to the
ones specified for the same groups with the
gnus-group-name-charset-group-alist variable (see below).
A select method can be very long, like:
(nntp "gmane" (nntp-address "news.gmane.org") (nntp-end-of-line "\n") (nntp-open-connection-function nntp-open-via-rlogin-and-telnet) (nntp-via-rlogin-command "ssh") (nntp-via-rlogin-command-switches ("-C" "-t" "-e" "none")) (nntp-via-address …))
In that case, you can truncate it into
(nntp "gmane") in this
variable. That is, it is enough to contain only the back end name and
the server name.
An alist of regexp of group name and the charset for group names.
((".*" . utf-8)) is the default value if UTF-8 is supported,
otherwise the default is
nil. For example:
(setq gnus-group-name-charset-group-alist '(("\\.com\\.cn:" . cn-gb-2312) (".*" . utf-8)))
Note that this variable is ignored if the match is made with
Those two variables are used also to determine the charset for encoding
and decoding non-ASCII group names that are in the back ends
nntp. It means that it is you who determine it. If
you do nothing, the charset used for group names in those back ends will
utf-8 because of the last element of
There is one more important variable for non-ASCII group names:
The value of this variable should be a coding system or
nil in Emacs, or is the aliasee of the coding system
file-name (a certain coding system of which an alias is
file-name) in XEmacs.
nnml back end, the
nnrss back end, the agent, and
the cache use non-ASCII group names in those files and
directories. This variable overrides the value of
file-name-coding-system which specifies the coding system used
when encoding and decoding those file names and directory names.
In XEmacs (with the
is the only means to specify the coding system used to encode and decode
file names. On the other hand, Emacs uses the value of
nil or it is bound to the value of
nnmail-pathname-coding-system which is
Normally the value of
default-file-name-coding-system in Emacs or
nnmail-pathname-coding-system in XEmacs is initialized according
to the locale, so you will need to do nothing if the value is suitable
to encode and decode non-ASCII group names.
The value of this variable (or
does not necessarily need to be the same value that is determined by
default-file-name-coding-system or this variable is
initialized by default to
iso-latin-1 for example, although you
want to subscribe to the groups spelled in Chinese, that is the most
typical case where you have to customize
utf-8 coding system is
a good candidate for it. Otherwise, you may change the locale in your
system so that
default-file-name-coding-system or this variable
may be initialized to an appropriate value.
Note that when you copy or move articles from a non-ASCII group to another group, the charset used to encode and decode group names should be the same in both groups. Otherwise the Newsgroups header will be displayed incorrectly in the article buffer.
|[ < ]||[ > ]||[ << ]||[ Up ]||[ >> ]|
This document was generated on January 25, 2015 using texi2html 1.82.