From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/52875 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: one more bug in latest gnus Date: Tue, 27 May 2003 23:57:11 +0200 Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1054072556 22271 80.91.224.249 (27 May 2003 21:55:56 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 27 May 2003 21:55:56 +0000 (UTC) Cc: ding@gnus.org, bugs@gnus.org, Dave Love Original-X-From: ding-owner+M1419@lists.math.uh.edu Tue May 27 23:55:53 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19KmPt-0005ld-00 for ; Tue, 27 May 2003 23:55:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19KmRm-0000Ag-00; Tue, 27 May 2003 16:57:30 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19KmRd-0000AZ-00 for ding@lists.math.uh.edu; Tue, 27 May 2003 16:57:21 -0500 Original-Received: (qmail 95462 invoked by alias); 27 May 2003 21:57:20 -0000 Original-Received: (qmail 95453 invoked from network); 27 May 2003 21:57:20 -0000 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net (HELO yxa.extundo.com) (217.13.230.178) by sclp3.sclp.com with SMTP; 27 May 2003 21:57:20 -0000 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.9/8.12.9) with ESMTP id h4RLvBB4020470 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 27 May 2003 23:57:12 +0200 Original-To: Vladimir Volovich Mail-Copies-To: nobody X-Payment: hashcash 1.2 0:030527:vvv@vsu.ru:5f5d492ff5732e21 X-Hashcash: 0:030527:vvv@vsu.ru:5f5d492ff5732e21 X-Payment: hashcash 1.2 0:030527:ding@gnus.org:6475f4e4d80c9326 X-Hashcash: 0:030527:ding@gnus.org:6475f4e4d80c9326 X-Payment: hashcash 1.2 0:030527:bugs@gnus.org:07a7f59c3430403f X-Hashcash: 0:030527:bugs@gnus.org:07a7f59c3430403f X-Payment: hashcash 1.2 0:030527:d.love@dl.ac.uk:2b9b76207e904a05 X-Hashcash: 0:030527:d.love@dl.ac.uk:2b9b76207e904a05 In-Reply-To: (Vladimir Volovich's message of "Tue, 27 May 2003 17:45:25 +0400") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:52875 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:52875 Vladimir Volovich writes: > Hello, > > please press C-d on this message, you'll see the attached > email; it's subject contains "=D0=B9=D0=9C=D0=A5=D0=A6=D0=AE =D0=B9=D0= =9D=D0=A0=D0=95=D0=9A=D0=AD=D0=9C=D0=A5=D0=99=D0=9D=D0=91=D0=AE =D0=A5 =D0= =B2=D0=95=D0=90=D0=9D=D0=A0=D0=AE=D0=95=D0=91=D0=AE". > The subject is encoded as koi8-r, while the correct > charset is windows-1251 (it was an error of user's mail agent). > > when i want to see the correctly encoded subject in gnus, i press > 0 g windows-1251 RET > and gnus re-encodes the message (both headers and body) in > windows-1251 encoding. > > for this, you need to execute > (codepage-setup 1251) > (define-coding-system-alias 'windows-1251 'cp1251) > > now, the bug in gnus is this: > > after doing such reencoding with 0 g windows-1251 RET, > i see correctly re-encoded subject in the Article buffer: > Subject: =D0=9A=D0=BD=D0=B8=D0=B3=D0=B0 =D0=9A=D0=BE=D1=82=D0=B5=D0=BB= =D1=8C=D0=BD=D0=B8=D0=BA=D0=BE=D0=B2=D0=B0 =D0=B8 =D0=A7=D0=B5=D0=B1=D0=BE= =D1=82=D0=B0=D0=B5=D0=B2=D0=B0 > but in the Summary buffer, i see only "=D0=9A=D0=BD=D0=B8=D0=B3=D0=B0" > but the rest of the subject is not shown. > > That may be due to the fact that in the original message the subject > consists of several lines: > > Subject: =3D?KOI8-R?Q?=3DCA=3DED=3DE8=3DE3=3DE0?=3D > =3D?KOI8-R?Q?__=3DCA=3DEE=3DF2=3DE5=3DEB=3DFC=3DED=3DE8=3DEA=3DEE=3DE2= =3DE0_=3DE8?=3D > =3D?KOI8-R?Q?_=3DD7=3DE5=3DE1=3DEE=3DF2=3DE0=3DE5=3DE2=3DE0?=3D > > and the word "=D0=9A=D0=BD=D0=B8=D0=B3=D0=B0" is on the first line; and g= nus incorrectly fails > to show the rest of the re-encoded subject in the Summary buffer. > (without re-encoding, it shows the whole subject). It seems to work for me with the patch Jesper and I posted earlier (see in gnus.gnus-bug). Dave, as the one who seem to have worked on rfc2047 recently, can you say if the patch the right thing or not? --- rfc2047.el.~6.52.~ Thu May 22 22:39:53 2003 +++ rfc2047.el Tue May 27 23:54:28 2003 @@ -612,7 +612,7 @@ (goto-char e) (while (re-search-forward "[\n\r]+" nil t) (replace-match " ")) - (goto-char (point-max))) + (setq b (goto-char (point-max)))) (when (and (mm-multibyte-p) mail-parse-charset (not (eq mail-parse-charset 'us-ascii)) @@ -697,7 +697,6 @@ mail-parse-charset) (setq cs mail-parse-charset)) ;; Fixme: What's this for? The following comment makes no sense. --= fx - (mm-with-unibyte-current-buffer ;; In Emacs Mule 4, decoding UTF-8 should be in unibyte mode. (mm-decode-coding-string (cond @@ -708,7 +707,7 @@ (quoted-printable-decode-string (mm-replace-chars-in-string string ?_ ? ))) (t (error "Invalid encoding: %s" encoding))) - cs))))) + cs)))) =20 (provide 'rfc2047) =20