From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/64934 Path: news.gmane.org!not-for-mail From: Katsumi Yamaoka Newsgroups: gmane.emacs.gnus.general Subject: non-ASCII newsgroup names Date: Fri, 13 Jul 2007 18:18:24 +0900 Organization: Emacsen advocacy group Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1184318420 31394 80.91.229.12 (13 Jul 2007 09:20:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 13 Jul 2007 09:20:20 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M13444@lists.math.uh.edu Fri Jul 13 11:20:18 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1I9HJx-0001Ht-Vu for ding-account@gmane.org; Fri, 13 Jul 2007 11:20:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1I9HIr-0004pd-6G; Fri, 13 Jul 2007 04:19:09 -0500 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1I9HIp-0004p9-Hh for ding@lists.math.uh.edu; Fri, 13 Jul 2007 04:19:07 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1I9HIo-0005L2-32 for ding@lists.math.uh.edu; Fri, 13 Jul 2007 04:19:07 -0500 Original-Received: from orlando.hostforweb.net ([216.246.45.90]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1I9HIm-0003vA-00 for ; Fri, 13 Jul 2007 11:19:04 +0200 Original-Received: from [66.225.201.151] (port=59979 helo=mail.jpl.org) by orlando.hostforweb.net with esmtpa (Exim 4.63) (envelope-from ) id 1I9HIB-0003UM-59 for ding@gnus.org; Fri, 13 Jul 2007 04:18:28 -0500 X-Hashcash: 1:20:070713:ding@gnus.org::HNHCST1ALjluYVlr:00004Ic5 X-Face: #kKnN,xUnmKia.'[pp`;Omh}odZK)?7wQSl"4o04=EixTF+V[""w~iNbM9ZL+.b*_CxUmFk B#Fu[*?MZZH@IkN:!"\w%I_zt>[$nm7nQosZ<3eu;B:$Q_:p!',P.c0-_Cy[dz4oIpw0ESA^D*1Lw= L&i*6&( User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) Cancel-Lock: sha1:1DYazAOkcJIOq6wvkR4r1rMotAM= X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - orlando.hostforweb.net X-AntiAbuse: Original Domain - gnus.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - jpl.org X-Source: X-Source-Args: X-Source-Dir: X-Spam-Score: -2.4 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:64934 Archived-At: (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,