Gnus development mailing list
 help / color / mirror / Atom feed
* non-ASCII newsgroup names
@ 2007-07-13  9:18 Katsumi Yamaoka
  2007-07-20 11:31 ` Katsumi Yamaoka
  0 siblings, 1 reply; 3+ messages in thread
From: Katsumi Yamaoka @ 2007-07-13  9:18 UTC (permalink / raw)
  To: ding

(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,



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: non-ASCII newsgroup names
  2007-07-13  9:18 non-ASCII newsgroup names Katsumi Yamaoka
@ 2007-07-20 11:31 ` Katsumi Yamaoka
  2007-09-11 12:01   ` Katsumi Yamaoka
  0 siblings, 1 reply; 3+ messages in thread
From: Katsumi Yamaoka @ 2007-07-20 11:31 UTC (permalink / raw)
  To: ding; +Cc: Feng Li

>>>>> Katsumi Yamaoka wrote:

> 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.

I've made nnml support non-ASCII group names in addition to nntp.
This is mainly for reading articles in non-ASCII nntp groups
through nnagent when Gnus is unplugged, but you can use non-ASCII
nnml groups as usual.

Note that I haven't tested yet the group compaction feature and
the mail splitting.  In addition, if you copy articles from a
non-ASCII nntp group to a nnml group, the charsets (`utf-8' by
default) used to decode group names should be the same in both
groups, or the Newsgroups header will be displayed incorrectly.

If you have a interest in it, please see the article

http://article.gmane.org/gmane.emacs.gnus.general/64934

(even though it is written in funny English ;-)), and make sure
the variables `gnus-group-name-charset-method-alist',
`gnus-group-name-charset-group-alist' and
`nnmail-pathname-coding-system' are specified properly.

See you next week.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: non-ASCII newsgroup names
  2007-07-20 11:31 ` Katsumi Yamaoka
@ 2007-09-11 12:01   ` Katsumi Yamaoka
  0 siblings, 0 replies; 3+ messages in thread
From: Katsumi Yamaoka @ 2007-09-11 12:01 UTC (permalink / raw)
  To: ding

(This article is in the thread:
 http://news.gmane.org/group/gmane.emacs.gnus.general/thread=64934)

>>>>> Katsumi Yamaoka wrote:

>> I've improved the non-ASCII newsgroup names handling of Gnus.

> I've made nnml support non-ASCII group names in addition to nntp.

I've added the `Non-ASCII Group Names' section to the Info manual
in the Gnus trunk.  Please fix any funny sentences and titles if any.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-11 12:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-13  9:18 non-ASCII newsgroup names Katsumi Yamaoka
2007-07-20 11:31 ` Katsumi Yamaoka
2007-09-11 12:01   ` Katsumi Yamaoka

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).