From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67114 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: cannot display folder with non-latin character using imap Date: Thu, 03 Jul 2008 16:32:33 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <86k5g2k61a.fsf@lifelogs.com> References: <86myl1uz2x.fsf@lifelogs.com> <87skutm6ti.fsf@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1215120607 1342 80.91.229.12 (3 Jul 2008 21:30:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 3 Jul 2008 21:30:07 +0000 (UTC) Cc: ding@gnus.org To: ssSslang Original-X-From: ding-owner+M15578@lists.math.uh.edu Thu Jul 03 23:30:43 2008 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 1KEWNg-0006d5-0s for ding-account@gmane.org; Thu, 03 Jul 2008 23:30:20 +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 1KEWMP-0002Qe-NY; Thu, 03 Jul 2008 16:29:01 -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 1KEWMN-0002QN-OI for ding@lists.math.uh.edu; Thu, 03 Jul 2008 16:28:59 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1KEWMG-0003xB-Hi for ding@lists.math.uh.edu; Thu, 03 Jul 2008 16:28:59 -0500 Original-Received: from mail.blockstar.com ([170.224.69.95]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1KEWMZ-0008Fd-00 for ; Thu, 03 Jul 2008 23:29:11 +0200 Original-Received: from tzlatanov-ubuntu-desktop.jumptrading.com (unknown [38.98.147.130]) by mail.blockstar.com (Postfix) with ESMTP id 3A87345869C; Thu, 3 Jul 2008 14:28:25 -0700 (PDT) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" X-Hashcash: 1:20:080703:sssslang@gmail.com::EGrc/1cjSMnOQo43:000000000000000000000000000000000000000000003B3 X-Hashcash: 1:20:080703:ding@gnus.org::tG+fJ6pyhKdAAclK:0000E98i In-Reply-To: <87skutm6ti.fsf@gmail.com> (sssslang@gmail.com's message of "Wed, 02 Jul 2008 09:08:09 +0800") User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) X-Spam-Score: -2.5 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67114 Archived-At: On Wed, 02 Jul 2008 09:08:09 +0800 ssSslang wrote:=20 s> Ted Zlatanov writes: >> Can you generate an IMAP and nnimap log? Set imap-debug and >> nnimap-debug to t, then take the contents of the two log buffers and >> attach it. s> here's imap log s> 11 LIST "" "*%" s> * LIST (\HasNoChildren) "." "[Gmail].&g0l6Pw-" s> * LIST (\HasNoChildren) "." "[Gmail].&XfJSoGYfaAc-" s> * LIST (\HasNoChildren) "." "[Gmail].&XfJT0ZCuTvY-" s> * LIST (\HasNoChildren) "." "[Gmail].&V4NXPpCuTvY-" s> * LIST (\HasNoChildren) "." "[Gmail].&YkBnCZCuTvY-" s> * LIST (\HasNoChildren) "." "[Gmail].&XfJSIJZkkK5O9g-" s> * LIST (\HasNoChildren) "." "testlabel" s> * LIST (\HasNoChildren) "." "INBOX" s> 11 OK List completed. s> 12 EXAMINE "INBOX" s> * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) s> * OK [PERMANENTFLAGS ()] Read-only mailbox. s> * 0 EXISTS s> * 0 RECENT s> * OK [UIDVALIDITY 1214734941] UIDs valid s> * OK [UIDNEXT 1] Predicted next UID s> 12 OK [READ-ONLY] Select completed. s> 13 EXAMINE "[Gmail].&XfJSoGYfaAc" s> 13 NO Mailbox doesn't exist: [Gmail].&XfJSoGYfaAc s> 14 EXAMINE "testlabel" s> * FLAGS (\Answered \Flagged \Deleted \Seen \Draft) s> * OK [PERMANENTFLAGS ()] Read-only mailbox. s> * 1 EXISTS s> * 0 RECENT s> * OK [UIDVALIDITY 1214735045] UIDs valid s> * OK [UIDNEXT 2] Predicted next UID s> 14 OK [READ-ONLY] Select completed. s> 15 FETCH 1,* UID s> * 1 FETCH (UID 1) s> 15 OK Fetch completed. s> 16 EXAMINE "[Gmail].&XfJSIJZkkK5O9g" s> 16 NO Mailbox doesn't exist: [Gmail].&XfJSIJZkkK5O9g s> 17 EXAMINE "[Gmail].&g0l6Pw" s> 17 NO Mailbox doesn't exist: [Gmail].&g0l6Pw s> 18 EXAMINE "[Gmail].&V4NXPpCuTvY" s> 18 NO Mailbox doesn't exist: [Gmail].&V4NXPpCuTvY s> 19 EXAMINE "[Gmail].&YkBnCZCuTvY" s> 19 NO Mailbox doesn't exist: [Gmail].&YkBnCZCuTvY s> 20 EXAMINE "[Gmail].&XfJT0ZCuTvY" s> 20 NO Mailbox doesn't exist: [Gmail].&XfJT0ZCuTvY s> 21 NOOP s> 21 OK NOOP completed. s> and nnimap log s> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D s> 1 -> nnimap-request-list: server=3D"GMail" s> | 2 -> nnimap-possibly-change-server: server=3D"GMail" s> | 2 <- nnimap-possibly-change-server: " *nnimap* GMail" s> | 2 -> nnimap-before-find-minmax-bugworkaround:=20 s> | 2 <- nnimap-before-find-minmax-bugworkaround: t s> | 2 -> nnimap-pattern-to-list-arguments: pattern=3D"*" s> | 2 <- nnimap-pattern-to-list-arguments: ((nil . "*")) s> | 2 -> nnimap-find-minmax-uid: group=3D"INBOX" examine=3Dexamine s> | 2 <- nnimap-find-minmax-uid: (0 nil nil) s> | 2 -> nnimap-find-minmax-uid: group=3D"[Gmail].=E5=B7=B2=E5=8A=A0=E6=98= =9F=E6=A0=87" examine=3Dexamine s> | 2 <- nnimap-find-minmax-uid: nil s> | 2 -> nnimap-find-minmax-uid: group=3D"testlabel" examine=3Dexamine s> | 2 <- nnimap-find-minmax-uid: (1 1 1) s> | 2 -> nnimap-find-minmax-uid: group=3D"[Gmail].=E5=B7=B2=E5=88=A0=E9=99= =A4=E9=82=AE=E4=BB=B6" examine=3Dexamine s> | 2 <- nnimap-find-minmax-uid: nil s> | 2 -> nnimap-find-minmax-uid: group=3D"[Gmail].=E8=8D=89=E7=A8=BF" exam= ine=3Dexamine s> | 2 <- nnimap-find-minmax-uid: nil s> | 2 -> nnimap-find-minmax-uid: group=3D"[Gmail].=E5=9E=83=E5=9C=BE=E9=82= =AE=E4=BB=B6" examine=3Dexamine s> | 2 <- nnimap-find-minmax-uid: nil s> | 2 -> nnimap-find-minmax-uid: group=3D"[Gmail].=E6=89=80=E6=9C=89=E9=82= =AE=E4=BB=B6" examine=3Dexamine s> | 2 <- nnimap-find-minmax-uid: nil s> | 2 -> nnimap-find-minmax-uid: group=3D"[Gmail].=E5=B7=B2=E5=8F=91=E9=82= =AE=E4=BB=B6" examine=3Dexamine s> | 2 <- nnimap-find-minmax-uid: nil s> 1 <- nnimap-request-list: t s> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> Can you quote the exact folder name for us, as well? I can try random >> UCS characters but it's good to test with the exact same parameters. s> last night i did some test. see line 2 of imap.log, it list a folder s> named "[Gmail].&g0l6Pw-", but at line 34, it examine a folder called s> "[Gmail].&g0l6Pw"(without the following '-'). the characters "&g0l6Pw-" s> is "=E8=8D=89=E7=A8=BF" in Chinese(means draft, sorry if you cannot disp= lay the s> Chinese characters). So in nnimap log, the function s> nnimap-find-minmax-uid which call imap examine returns nil. s> Then i examine the two functions in imap.el: imap-utf7-encode and s> imap-utf7-decode. i found imap-utf7-encode is strange(i don't know s> lisp, so i just test and guess). it encode "=E8=8D=89=E7=A8=BF" to "&g0l= 6Pw" without s> the last "-". I tried to make it do so by this: s> --- imap-org.el 2008-06-30 01:37:05.000000000 +0800 s> +++ imap.el 2008-06-30 00:51:39.000000000 +0800 s> @@ -464,7 +464,7 @@ s> (if imap-use-utf7 s> (and string s> (condition-case () s> - (utf7-encode string t) s> + (concat (utf7-encode string t) "-") s> (error (message s> "imap: Could not UTF7 encode `%s', using it unencoded..." s> string) s> Then I can see the right folder when i enter server buffer, while still s> cannot select the buffer. I think this maybe something wrong in the s> nnimap backend. So, if you find something, please correct it. Thanks. [reordered] s> Thank you for your reply, Ted. This is a long message, please read s> patiently. Can you please avoid top-posting? Thanks. Also, your report was very helpful and I appreciate all the effort you put into it. I don't see the problem here. I do get an error but it's not due to the utf7 ancoding, and I think it's registry-related (everything works until AFTER the message is spooled, and the article doesn't show up until after a refresh). Here's me entering the group: nnimap log: 1 -> nnimap-close-group: group=3D"INBOX.\345\267\262\345\212\240\346\230\23= 7\346\240\207" server=3D"blockstar.com" | 2 -> nnimap-possibly-change-group: group=3D"INBOX.\345\267\262\345\212\24= 0\346\230\237\346\240\207" server=3D"blockstar.com" | | 3 -> nnimap-possibly-change-server: server=3D"blockstar.com" | | 3 <- nnimap-possibly-change-server: " *nnimap* blockstar.com" | | 3 -> nnimap-verify-uidvalidity: group=3D"INBOX.\345\267\262\345\212\240= \346\230\237\346\240\207" server=3D"blockstar.com" | | 3 <- nnimap-verify-uidvalidity: t | 2 <- nnimap-possibly-change-group: "INBOX.&ACAAIAAgACAAIAAgACAAIAAgACAAIA= Ag-" 1 <- nnimap-close-group: nil IMAP log: 2177 EXAMINE "INBOX.&ACAAIAAgACAAIAAgACAAIAAgACAAIAAg-"=0D * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)=0D * OK [PERMANENTFLAGS ()] No permanent flags permitted=0D * 3 EXISTS=0D * 0 RECENT=0D * OK [UIDVALIDITY 1215118658] Ok=0D * OK [MYRIGHTS "acdilrsw"] ACL=0D 2177 OK [READ-ONLY] Ok=0D 2178 FETCH 1,* UID=0D * 1 FETCH (UID 1)=0D * 3 FETCH (UID 3)=0D 2178 OK FETCH completed.=0D 2179 NOOP=0D 2179 OK NOOP completed=0D 2180 SELECT "INBOX.&ACAAIAAgACAAIAAgACAAIAAgACAAIAAg-"=0D * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)=0D * OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited= =0D * 3 EXISTS=0D * 0 RECENT=0D * OK [UIDVALIDITY 1215118658] Ok=0D * OK [MYRIGHTS "acdilrsw"] ACL=0D 2180 OK [READ-WRITE] Ok=0D 2181 STATUS "INBOX.&ACAAIAAgACAAIAAgACAAIAAgACAAIAAg-" (UNSEEN)=0D * STATUS "INBOX.&ACAAIAAgACAAIAAgACAAIAAgACAAIAAg-" (UNSEEN 3)=0D 2181 OK STATUS Completed.=0D 2182 EXPUNGE=0D 2182 OK EXPUNGE completed=0D 2183 NOOP=0D 2183 OK NOOP completed=0D So for your specific problem I see the '-' at the end of the encoded string in my IMAP and nnimap logs. Also, utf7-encode-internal inserts the last '-' explicitly, so what you observed shouldn't be possible unless something is eating that last character. Really strange. I used the group name =E5=B7=B2=E5=8A=A0=E6=98=9F=E6=A0=87. Maybe the problem is = caused by the [Gmail] string at the beginning of the group name. The Gnus utf7.el is pretty outdated. Emacs offers newer facilities for UTF-7 encoding in lisp/international/utf-7.el and Gnus should probably use them (in imap.el). Reiner, Katsumi, WDYT? Feel free to cc emacs-devel if necessary. Ted