[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Invalid base64 data
- To: wl-en@ml.gentei.org
- Subject: Invalid base64 data
- From: "Herbert J. Skuhra" <hskuhra@eumx.net>
- Date: Fri, 06 Jun 2014 00:41:46 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=eumx.net; h=date:message-id :from:to:subject:mime-version:content-type; q=dns; s=default; b= af57JaoUPZ2Z4cFl/B68tym4rsEoPWQUCNJaKxwEDszqtKl+JmFAVCk63lI83Qwl H8DXJrPWc8KL/B/jr7z2J1LIRKK++3roHQmtDf3306MD/q2YLnLPNPzAnY2RWeLR EcyFcL8jsYyG51FGIbxuvfOBhVGX1SJH5xDFLmR6v0U=
- Reply-to: wl-en@ml.gentei.org
- User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/24.4.50 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO)
Hi,
via a mailing list I received a base64 encoded message with a
signature at the end added by the list software. No multipart!
--- message ---
[..]
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64
U29tZW9uZSBrbm93cyBzb21lIHBhc3N3b3JkCgpPbiBKdW4gNSwgMjAxNCAxOjMzIFBNLCBNYXJ0
[..]
cGQub3JnIAo+Cg==
You received this mail because you are subscribed to xxx@yyy
To unsubscribe, send a mail to: xxx+unsubscribe@yyy
--- end ---
Wl fails to display the message with the error:
This entity can't be decoded. Invalid base64 data
The message displays fine in Gnus. Obviously the fix is in
mm-decode-content-transfer-encoding:
((eq encoding 'base64)
(base64-decode-region
(point-min)
;; Some mailers insert whitespace
;; junk at the end which
;; base64-decode-region dislikes.
;; Also remove possible junk which could
;; have been added by mailing list software.
(save-excursion
(goto-char (point-min))
(while (re-search-forward "^[\t ]*\r?\n" nil t)
(delete-region (match-beginning 0) (match-end 0)))
(goto-char (point-max))
(when (re-search-backward "^[\t ]*[A-Za-z0-9+/]+=*[\t ]*$"
nil t)
(forward-line))
(point))))
Should wl/flim also handle this case?
--
Herbert