| [ < ] | [ > ] | [ << ] | [ 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 nntp
back end but also with the nnml back end and the nnrss
back end.
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:
gnus-group-name-charset-method-alist
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.
gnus-group-name-charset-group-alist
((".*" . 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
gnus-group-name-charset-method-alist.
Those two variables are used also to determine the charset for encoding
and decoding non-ASCII group names that are in the back ends
other than 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
all be utf-8 because of the last element of
gnus-group-name-charset-group-alist.
There is one more important variable for non-ASCII group names. XEmacs users must set this. Emacs users necessarily need not do:
nnmail-pathname-coding-system
nil
(which is the default). The nnml back end, the nnrss back
end, the NNTP marks feature (see section 6.2.1.4 NNTP marks), 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 mule feature), file-name-coding-system
is the only means to specify the coding system used to encode and decode
file names. Therefore, you, XEmacs users, have to set it to the
coding system that is suitable to encode and decode non-ASCII
group names. On the other hand, Emacs uses the value of
default-file-name-coding-system if file-name-coding-system
is nil. Normally the value of
default-file-name-coding-system 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 default-file-name-coding-system)
does not necessarily need to be the same value that is determined by
gnus-group-name-charset-method-alist and
gnus-group-name-charset-group-alist.
If you want to subscribe to the groups spelled in Chinese but
default-file-name-coding-system is initialized by default to
iso-latin-1 for example, that is the most typical case where you
have to set nnmail-pathname-coding-system even if you are an
Emacs user. The 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 may be initialized to an
appropriate value, instead of specifying this variable.
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 ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |