emacs-pretest-bug
[Top][All Lists]
Advanced

[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: Thu, 19 Oct 2006 12:56:29 +0900
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.50 (gnu/linux)

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

> Zhang Wei <address@hidden> writes:

>> `.newsrc.eld' can't save chinese group name in proper coding. When gnus
>> is restarted, all of the articles in groups with chinese name are marked
>> unread. But enter that group, you will find all of the articles are old
>> articles (marked by an `O'). The file in the attachment is the wrong
>> formatted `.newsrc.eld', hope that will be helpful.

> The problem seems to be that when a Chinese group name is given, e.g.
> "好", `gnus-group-insert-group-line' ends up calling

>   (decode-coding-string "好" 'utf-8)

> which gives gibberish.  Could either the coding systems experts
> (i.e. Handa) or Gnus experts tell us why this is the wrong thing to
> do?

Gnus uses utf-8 encoded non-ASCII group names internally, those
encoded names are saved in the .newsrc.eld file, and they are
decoded by utf-8 when displaying.  I had no problem when I once
tried nnrss groups with Japanese names.  So, I cannot imagine
what is happening with Zhang Wei, sorry.

> I think the way to reproduce this is as follows:

> 1. save an empty file with a Chinese filename:
>    C-x C-f 好 RET RET C-x C-s

>    (I simply copied the character into the minibuffer from the HELLO
>    file.)

> 2. go to the Gnus group buffer:
>    M-x gnus RET

> 3. Open that file as a Gnus group:
>    G f

> => Gnus group line is shown in Gibberish

It is caused because of the default value of
`gnus-group-name-charset-group-alist'.  It can be fixed with the
following:

(push '("\\`nndoc\\(\\+?[^:]+\\)?:")
      gnus-group-name-charset-group-alist)

However, I'm not quite sure making it the new default is
generally good.

Regards,




reply via email to

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