Gnus development mailing list
 help / color / mirror / Atom feed
* Gnus nnimap doesn't decode Gmail's imap labels(folders)
@ 2011-07-21  8:49 Chunyu Wang
  2011-08-21  3:53 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Chunyu Wang @ 2011-07-21  8:49 UTC (permalink / raw)
  To: ding, larsi; +Cc: cymacs


My Gmail account's language setting is in Chinese, so all labels except
INBOX are in Chinese. Chinese labels in Gmail's imap are encoded in
modified UTF-7 as described RFC-2060 5.1.3. With the following
gnus-select-method, I can read/get NEW mails in the INBOX, but all
others folders(Gmail labels) do not work well. Gnus can't get in these
nnimap 'groups'.

  (setq gnus-select-method '(nnimap "imap.gmail.com"))

The Gnus *Group* buffer:
------------------------------------------
       *: [Gmail]/&kc2JgQ-
       0: Notes
       *: [Gmail]/&XfJT0ZCuTvY-
       *: [Gmail]/&YkBnCZCuTvY-
       *: [Gmail]/&g0l6Pw-
       0: INBOX
       *: [Gmail]
       *: [Gmail]/&XfJSoGYfaAc-
       1: nndraft:drafts

-------------------------------------------

The whole buffer(or a single line) as a string can be decode into
correct Chinese label with utf7-decode.
 
  (utf7-decode "*: [Gmail]/&kc2JgQ-" t) 
  ==> "*: [Gmail]/重要"

The decoded whole buffer:
------------------------------------------
       *: [Gmail]/重要
       0: Notes
       *: [Gmail]/已发邮件
       *: [Gmail]/所有邮件
       *: [Gmail]/草稿
       0: INBOX
       *: [Gmail]
       *: [Gmail]/已加星标
       1: nndraft:drafts

-------------------------------------------



If the lables are changed into ASCII in Gmail web interface. Gnus can
read and access the corresponding group well.




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

* Re: Gnus nnimap doesn't decode Gmail's imap labels(folders)
  2011-07-21  8:49 Gnus nnimap doesn't decode Gmail's imap labels(folders) Chunyu Wang
@ 2011-08-21  3:53 ` Lars Magne Ingebrigtsen
  2011-08-21  6:52   ` Chunyu Wang
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-08-21  3:53 UTC (permalink / raw)
  To: Chunyu Wang; +Cc: ding

Chunyu Wang <cymacs@gmail.com> writes:

> My Gmail account's language setting is in Chinese, so all labels except
> INBOX are in Chinese. Chinese labels in Gmail's imap are encoded in
> modified UTF-7 as described RFC-2060 5.1.3. With the following
> gnus-select-method, I can read/get NEW mails in the INBOX, but all
> others folders(Gmail labels) do not work well. Gnus can't get in these
> nnimap 'groups'.
>
>   (setq gnus-select-method '(nnimap "imap.gmail.com"))
>
> The Gnus *Group* buffer:
> ------------------------------------------
>        *: [Gmail]/&kc2JgQ-

I think this has been fixed a couple of weeks ago.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: Gnus nnimap doesn't decode Gmail's imap labels(folders)
  2011-08-21  3:53 ` Lars Magne Ingebrigtsen
@ 2011-08-21  6:52   ` Chunyu Wang
  2011-09-10 22:56     ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Chunyu Wang @ 2011-08-21  6:52 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
> I think this has been fixed a couple of weeks ago.

Sorry, it's still not work now. Only in *Gnus Browse Server* buffer,
Gnus can decode Chinese group name correctly, get in summary buffer and
read mails. The *Group* buffer is still as before. The following details
the situation.

    rm -rf ~/Mail ~/News ~/.*.eld ~/.newsrc-dribble
    emacs -q
    M-x (setq gnus-select-method '(nnimap "imap.gmail.com"))
    M-x gnus

In *Message* buffer (or minibuffer):

    (nnimap "imap.gmail.com")
    Opening connection to imap.gmail.com via tls...
    Subscribe newsgroup: [Gmail]/+YkBnCZCuTvY
    Subscribe newsgroup: [Gmail]/+kc2JgQ
    Subscribe newsgroup: Notes
    Subscribe newsgroup: [Gmail]/+XfJT0ZCuTvY
    Subscribe newsgroup: [Gmail]/+g0l6Pw
    Subscribe newsgroup: [Gmail]/+XfJSoGYfaAc
    Subscribe newsgroup: INBOX
    Subscribe newsgroup: [Gmail]
    Opening nnfolder server on archive...done
    8 new newsgroups have arrived
    [...]

And in *Group* buffer:
       0: INBOX
       0: Notes
       0: [Gmail]
       0: [Gmail]/+XfJSoGYfaAc
       0: [Gmail]/+XfJT0ZCuTvY
       0: [Gmail]/+g0l6Pw
       0: [Gmail]/+kc2JgQ
       0: [Gmail]/+YkBnCZCuTvY
       0: nndraft:drafts

Gnus can't read these groups. If I type '^' to get in *Server* buffer:

     {nnfolder:archive} (opened)
     {nnimap:imap.gmail.com} (opened)

and hit RET on the second line with nnimap:imap.gmail.com to goto the *Gnus
Browse Server* buffer:

    7062: INBOX
      11: Notes
K      0: [Gmail]/已加星标
K   1988: [Gmail]/已发邮件
K  18293: [Gmail]/所有邮件
K      0: [Gmail]/草稿
K    555: [Gmail]/重要

Gnus can decode the correct buffer name, but not suscribed. If I type u and
RET on a single line, Gnus can get in summary buffer and read mails. But with
the following undecode messages echoed in the minibuffer(and *Message*
buffer), and it seems like another decode(charset) problem.

  Subscribe newsgroup: [Gmail]/\346\211\200\346\234\211\351\202\256\344\273\266

With two q back to *Group* buffer, Gnus subscribed the 'correct' name group, but
the group can't be read.

       0: INBOX
       0: Notes
       0: [Gmail]
       0: [Gmail]/+XfJSoGYfaAc
       0: [Gmail]/+XfJT0ZCuTvY
       0: [Gmail]/+g0l6Pw
       0: [Gmail]/+kc2JgQ
       0: [Gmail]/+YkBnCZCuTvY
==>    *: [Gmail]/所有邮件
       0: nndraft:drafts

If I hit RET on that 'correct' group (line) in *Group* buffer, the following error
message shows up.

  gnus-select-newsgroup: Couldn't activate group [Gmail]/所有邮件: BAD Invalid Command

It seems like Gnus use wrong encode group name for some kind of command.



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

* Re: Gnus nnimap doesn't decode Gmail's imap labels(folders)
  2011-08-21  6:52   ` Chunyu Wang
@ 2011-09-10 22:56     ` Lars Magne Ingebrigtsen
  2011-09-10 23:13       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-10 22:56 UTC (permalink / raw)
  To: Chunyu Wang; +Cc: ding

Chunyu Wang <cymacs@gmail.com> writes:

> Sorry, it's still not work now. Only in *Gnus Browse Server* buffer,
> Gnus can decode Chinese group name correctly, get in summary buffer and
> read mails. The *Group* buffer is still as before.

Yes, the IMAP group name charset situation is currently messed up.  But
I'm not sure what the right approach to fixing it is, as it involves
subtle encoding issues for all the backends.

I think the only feasible way is to let Gnus en/decode all nnimap group
names, since it does that with all other backends.  nnimap will then
have to re-decode and then encode the names again.

Hm.  Perhaps it won't be that difficult.  I'm going to try to implement
that now.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

* Re: Gnus nnimap doesn't decode Gmail's imap labels(folders)
  2011-09-10 22:56     ` Lars Magne Ingebrigtsen
@ 2011-09-10 23:13       ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 5+ messages in thread
From: Lars Magne Ingebrigtsen @ 2011-09-10 23:13 UTC (permalink / raw)
  To: Chunyu Wang; +Cc: ding

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Hm.  Perhaps it won't be that difficult.  I'm going to try to implement
> that now.

Ok; that wasn't too hard.  But I'm not sure I got all the instances,
because it required a bit heavy-handed editing.

Please give git Gnus a try and see whether it works better now.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/



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

end of thread, other threads:[~2011-09-10 23:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-21  8:49 Gnus nnimap doesn't decode Gmail's imap labels(folders) Chunyu Wang
2011-08-21  3:53 ` Lars Magne Ingebrigtsen
2011-08-21  6:52   ` Chunyu Wang
2011-09-10 22:56     ` Lars Magne Ingebrigtsen
2011-09-10 23:13       ` Lars Magne Ingebrigtsen

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