From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: non-ASCII newsgroup names
Date: Fri, 13 Jul 2007 18:18:24 +0900 [thread overview]
Message-ID: <b4md4yw7jbz.fsf@jpl.org> (raw)
(I wish it were not a disturbance to syncing Gnus and Emacs.)
Hi,
I've improved the non-ASCII newsgroup names handling of Gnus.
This is kind of a major change, so I did a job only in the
Gnus CVS trunk, a.k.a., No Gnus.
(The changes I also installed to the v5-10 branch are not
necessarily related to non-ASCII group names. They fix
miscellaneous bugs that I found while I was working.)
People who subscribe to or want to subscribe to newsgroups of
which the names contain non-ASCII characters had better use the
trunk for some time. Note that the back ends other than nntp or
nnrss have not been completed yet for non-ASCII group names.
To read and post those newsgroups, there are three variables
that you have to set properly:
gnus-group-name-charset-method-alist
====================================
If the newsgroup names are all encoded with the gb2312 charset
in the nntp server news.cn.example.com, and the newsgroup names
in news.jp.example.com are all encoded with the euc-jp charset,
set it as:
(setq gnus-group-name-charset-method-alist
'(((nntp "news.cn.example.com") . gb2312)
((nntp "news.jp.example.com") . euc-jp)))
The car of each element is a select-method object. If it is
very long, like
(nntp "quimby" (nntp-address "news.gnus.org") (nntp-end-of-line ...
, you can truncate it into (nntp "quimby").
For Gnus v5.11, it has to be exactly the same as the actual
method.
gnus-group-name-charset-group-alist
===================================
This variable specifies regexps matching group names and
corresponding charsets. For instance:
(setq gnus-group-name-charset-group-alist
'(("\\`gnus\\.alt\\.chinese\\." . gb2312)
("\\`gnus\\.alt\\.japanese\\." . euc-jp)
(".*" . utf-8)))
Where the last element is the default charset to decode group
names. Note that this variable is ignored if the match is made
with `gnus-group-name-charset-method-alist'.
nnmail-pathname-coding-system
=============================
*XEmacs users must set this*. Emacs users necessarily need not
do. This overrides the value of `file-name-coding-system' which
specifies the coding system used to encode and decode file names.
Since the Agent, the nntp marks feature, and the nnrss back end
use non-ASCII group names in file names, the coding system has
to be set properly anyway. The default value is nil.
In XEmacs (w/ Mule), only `file-name-coding-system' is the means
to specify the coding system used to encode and decode file names.
On the other hand, Emacs uses `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.
There are two main points in this improvement. One is to make
encoded non-ASCII group names all unibyte internally. Since
multibyte ones and unibyte ones coexisted formerly, Gnus sometimes
failed in identifying a group.
The other is to make `file-name-coding-system' be bound to
`nnmail-pathname-coding-system' when accessing files of which
the names contain non-ASCII group names. In addition to this,
I've modified `nnmail-group-pathname' so as not to encode file
names by `nnmail-pathname-coding-system'. It produced the
encoding of file names doubly (the first is done by itself, the
second is done by `file-name-coding-system').
Regards,
next reply other threads:[~2007-07-13 9:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-13 9:18 Katsumi Yamaoka [this message]
2007-07-20 11:31 ` Katsumi Yamaoka
2007-09-11 12:01 ` Katsumi Yamaoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b4md4yw7jbz.fsf@jpl.org \
--to=yamaoka@jpl.org \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).