Gnus development mailing list
 help / color / mirror / Atom feed
From: Jesper Harder <harder@myrealbox.com>
Cc: "Vladimir Volovich" <vvv@vsu.ru>, bugs@gnus.org
Subject: Re: bug in latest gnus when previewing certain message
Date: Mon, 26 May 2003 19:26:41 +0200	[thread overview]
Message-ID: <m33cj1ippq.fsf@defun.localdomain> (raw)
In-Reply-To: <basjcm$28e$1@quimby.gnus.org>

[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]

Simon Josefsson <jas@extundo.com> writes:

> "Vladimir Volovich" <vvv@vsu.ru> 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  <fx@gnu.org>
| 
| 	* 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?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: rfc2047.el.diff --]
[-- Type: text/x-patch, Size: 1039 bytes --]

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

  parent reply	other threads:[~2003-05-26 17:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-25 15:55 Vladimir Volovich
2003-05-26  8:19 ` Simon Josefsson
     [not found] ` <basjcm$28e$1@quimby.gnus.org>
2003-05-26 17:26   ` Jesper Harder [this message]
     [not found]     ` <rzqel2iiub6.fsf@albion.dl.ac.uk>
2003-05-30  2:52       ` Jesper Harder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m33cj1ippq.fsf@defun.localdomain \
    --to=harder@myrealbox.com \
    --cc=bugs@gnus.org \
    --cc=vvv@vsu.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).