From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/52853 Path: main.gmane.org!not-for-mail From: Jesper Harder Newsgroups: gmane.emacs.gnus.general Subject: Re: bug in latest gnus when previewing certain message Date: Mon, 26 May 2003 19:26:41 +0200 Organization: http://purl.org/harder/ Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1053970082 11127 80.91.224.249 (26 May 2003 17:28:02 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 26 May 2003 17:28:02 +0000 (UTC) Cc: "Vladimir Volovich" , bugs@gnus.org Original-X-From: ding-owner+M1397@lists.math.uh.edu Mon May 26 19:27:55 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 19KLlL-0002sk-00 for ; Mon, 26 May 2003 19:27:55 +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 19KLmp-0003a2-00; Mon, 26 May 2003 12:29:27 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19KLmg-0003Zw-00 for ding@lists.math.uh.edu; Mon, 26 May 2003 12:29:18 -0500 Original-Received: (qmail 6892 invoked by alias); 26 May 2003 17:29:17 -0000 Original-Received: (qmail 6887 invoked from network); 26 May 2003 17:29:16 -0000 Original-Received: from quimby.gnus.org (80.91.224.244) by sclp3.sclp.com with SMTP; 26 May 2003 17:29:16 -0000 Original-Received: from news by quimby.gnus.org with local (Exim 3.12 #1 (Debian)) id 19KLxw-00061d-00 for ; Mon, 26 May 2003 19:40:56 +0200 Original-To: ding@gnus.org Original-Path: localhost.localdomain!nobody Original-Newsgroups: gnus.ding Original-Lines: 73 Original-NNTP-Posting-Host: 0xc3d7e0b8.esnxr4.ras.tele.dk Original-X-Trace: quimby.gnus.org 1053970856 23164 195.215.224.184 (26 May 2003 17:40:56 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 26 May 2003 17:40:56 GMT X-Face: ^RrvqCr7c,P$zTR:QED"@h9+BTm-"fjZJJ-3=OU7.)i/K]<.J88}s>'Z_$r; writes: > "Vladimir Volovich" writes: > >> using the latest gnus from cvs, i get the following error when trying to >> view the attached (spam) message: >> >> Debugger entered--Lisp error: (args-out-of-range 650 650) >> mm-decode-coding-region(650 650 koi8-r) >> mail-decode-encoded-word-region(1 883) > > This seems to fix it, but someone familiar with rfc2047.el better check. I think this change is the culprit: ,---- | 2003-05-02 Dave Love | | * rfc2047.el (rfc2047-q-encode-region, rfc2047-decode): Use | mm-with-unibyte-current-buffer. `---- I.e. `mm-with-unibyte-current-buffer-mule4' was changed to `mm-with-unibyte-current-buffer' which isn't equivalent -- the latter makes the current buffer unibyte which the former doesn't in Mule > 4. This patch fixes it. But I never understood what the mule4 stuff was about, so it might break on Emacsen that use that. Which Emacs versions use Mule version 4, by the way? Maybe we don't need to support it anymore? --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=rfc2047.el.diff --- gnus/lisp/rfc2047.el Wed May 21 16:53:23 2003 +++ rfc2047.el Mon May 26 19:18:06 2003 @@ -697,18 +697,17 @@ 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 - ((equal "B" encoding) - (base64-decode-string - (rfc2047-pad-base64 string))) - ((equal "Q" encoding) - (quoted-printable-decode-string - (mm-replace-chars-in-string string ?_ ? ))) - (t (error "Invalid encoding: %s" encoding))) - cs))))) + ;; In Emacs Mule 4, decoding UTF-8 should be in unibyte mode. + (mm-decode-coding-string + (cond + ((equal "B" encoding) + (base64-decode-string + (rfc2047-pad-base64 string))) + ((equal "Q" encoding) + (quoted-printable-decode-string + (mm-replace-chars-in-string string ?_ ? ))) + (t (error "Invalid encoding: %s" encoding))) + cs)))) (provide 'rfc2047) --=-=-=--