[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: `.newsrc.eld' saves chinese group name in wrong coding

From: Katsumi Yamaoka
Subject: Re: `.newsrc.eld' saves chinese group name in wrong coding
Date: Fri, 20 Oct 2006 14:18:46 +0900
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.0.50 (gnu/linux)

>>>>> In <address@hidden> Katsumi Yamaoka wrote:
>>>>>> In <address@hidden> Chong Yidong wrote:

>> So what needs to be changed?

> I'm now looking into it.  However, I think improving of nndoc
> might not help Zhang Wei because the problem looked caused by
> the nntp group.  So, I'm not urged by myself so much.

>>>>>> In <address@hidden>
>>>>>>  Zhang Wei <address@hidden> wrote:

> [...]

>> (setq gnus-newsrc-alist 
>> '(("\301\367\320\30799.\261\276\265\330\262\342\312\324" 3 ((1 . 8)) ((seen 
>> (1 . 8))))...

The following patch enables Gnus to use non-ASCII names in nndoc
groups.  I've tested it with the "~/好" file containing mbox
data.  After some other tests, I will install it to the Gnus
trunk and the v5-10 branch.

I don't think it solves Zhang Wei's problem anyway, though.  I'm
unable to test with nntp groups of non-ASCII names, but IIRC,
Gnus has been completed to run with those groups a couple of
years ago (even if there might still be trivial difficulties).

--8<---------------cut here---------------start------------->8---
*** gnus-group.el~      Mon Jul 17 21:52:02 2006
--- gnus-group.el       Fri Oct 20 05:15:50 2006
*** 2680,2692 ****
                          (t (setq err (format "%c unknown. " char))
        (setq type found)))
!   (let* ((file (expand-file-name file))
!        (name (gnus-generate-new-group-name
!               (gnus-group-prefixed-name
!                (file-name-nondirectory file) '(nndoc "")))))
!      (gnus-group-real-name name)
!      (list 'nndoc file
           (list 'nndoc-address file)
           (list 'nndoc-article-type (or type 'guess))))))
--- 2680,2697 ----
                          (t (setq err (format "%c unknown. " char))
        (setq type found)))
!   (setq file (expand-file-name file))
!   (let ((name (gnus-generate-new-group-name
!              (gnus-group-prefixed-name
!               (file-name-nondirectory file) '(nndoc ""))))
!       (encodable (mm-coding-system-p 'utf-8)))
!      (if encodable
!        (mm-encode-coding-string (gnus-group-real-name name) 'utf-8)
!        (gnus-group-real-name name))
!      (list 'nndoc (if encodable
!                     (mm-encode-coding-string file 'utf-8)
!                   file)
           (list 'nndoc-address file)
           (list 'nndoc-article-type (or type 'guess))))))
--8<---------------cut here---------------end--------------->8---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]