From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/37501 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: Large *.pif base64 attachments and Gnus... Date: Sun, 05 Aug 2001 01:36:48 +0200 Message-ID: References: <87puabq0wh.fsf@deneb.enyo.de> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1035172905 14227 80.91.224.250 (21 Oct 2002 04:01:45 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:01:45 +0000 (UTC) Cc: Florian Weimer , ding@gnus.org Return-Path: Return-Path: Original-Received: (qmail 23597 invoked from network); 4 Aug 2001 23:35:32 -0000 Original-Received: from dolk.extundo.com (195.42.214.242) by gnus.org with SMTP; 4 Aug 2001 23:35:32 -0000 Original-Received: from barbar.josefsson.org (slipsten.extundo.com [195.42.214.241]) (authenticated) by dolk.extundo.com (8.11.3/8.11.3) with ESMTP id f74NZew07040; Sun, 5 Aug 2001 01:35:41 +0200 Original-To: Pavel@Janik.cz (Pavel =?iso-8859-2?q?Jan=EDk?=) In-Reply-To: (Pavel@Janik.cz's message of "Sat, 04 Aug 2001 21:58:48 +0200") Mail-Copies-To: nobody User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.0.104 Original-Lines: 60 Xref: main.gmane.org gmane.emacs.gnus.general:37501 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:37501 Pavel@Janik.cz (Pavel Jan=EDk) writes: > From: Florian Weimer > > > It is a bug in 'base64-decode-region'. Perhaps it's fixed in Emacs > > 21, I don't know. The base64 encoding is indeed incorrect, and that's >=20 > huh, I use 21 :-( So I will report this bug to appropriate mailing > list. Thank you. No, there's nothing wrong with `base64-decode-region', Gnus simply catches the error and message it. Does the following help? Btw, the error with the b64 encoding is that it ends with "=3D=3D=3D", which is invalid. Maybe the b64 parser should be made able to cope with that simple error. Index: mm-decode.el =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 RCS file: /usr/local/cvsroot/gnus/lisp/mm-decode.el,v retrieving revision 6.48 diff -u -u -w -u -w -r6.48 mm-decode.el --- mm-decode.el 2001/08/04 00:33:18 6.48 +++ mm-decode.el 2001/08/04 23:31:56 @@ -891,20 +891,22 @@ (if (member (mm-handle-media-supertype handle) '("text" "message")) (with-temp-buffer (insert-buffer-substring (mm-handle-buffer handle)) + (prog1 (mm-decode-content-transfer-encoding (mm-handle-encoding handle) (mm-handle-media-type handle)) (let ((temp (current-buffer))) (set-buffer cur) - (insert-buffer-substring temp))) + (insert-buffer-substring temp)))) (mm-with-unibyte-buffer (insert-buffer-substring (mm-handle-buffer handle)) + (prog1 (mm-decode-content-transfer-encoding (mm-handle-encoding handle) (mm-handle-media-type handle)) (let ((temp (current-buffer))) (set-buffer cur) - (insert-buffer-substring temp))))))) + (insert-buffer-substring temp)))))))) =20 (defun mm-file-name-delete-whitespace (file-name) "Remove all whitespace characters from FILE-NAME." @@ -959,7 +961,8 @@ =20 (defun mm-save-part-to-file (handle file) (mm-with-unibyte-buffer - (mm-insert-part handle) + (or (mm-insert-part handle) + (error "Error with message")) (let ((coding-system-for-write 'binary) ;; Don't re-compress .gz & al. Arguably we should make ;; `file-name-handler-alist' nil, but that would chop