Article View: gnu.emacs.vm.bug
Article #800VM displays base64 text but can't include it in followup.
From: Jonathan Lennox
Date: Tue, 22 Jul 2003 21:13
Date: Tue, 22 Jul 2003 21:13
69 lines
3743 bytes
3743 bytes
--lW1JyXw6pK Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit (I've tried submitting this bug report a few times via vm-submit-bug-report, but I've never gotten a response, and the bug hasn't been fixed. In case it's somehow getting filtered by Kyle's spam filters or something, I'm now posting it to the newsgroup instead.) I often receive base64-encoded messages, such as the one attached, in a charset I can't normally display. When I $<ret> (vm-mime-reader-map-display-using-default) on the highlighted "plain text, ks_c_5601-1987 [Click mouse-2 to save to a file]" line, the text displays normally -- it's actually using the ASCII subset of the charset. However, when I hit F (vm-followup-include-text) on the message, the included message is binary gibberish -- the reply body contains the "On <date>, <sender> wrote to <rcpt>" line, followed by random junk. I have vm's base64-encode and base64-decode utilities installed and in my $PATH, and vm's using them. (I'm using vm-7.17, so this happens automatically.) I've experimented somewhat with this (it happens with qp-encoded as well as base64-encoded information), and I think I've figured out the problem. The function vm-yank-message invokes the function vm-mime-transfer-decode-region (at line 323 of vm-reply.el in vm-7.17). It passes to this function three arguments: a layout, the start position, and the end position. However, if you step through this function and examine the actual contents of the buffers, you will find that the 'start' argument is the start of the reply headers, not the start of the base64-encoded block! Thus, vm-mime-base64-decode-region tries to base64-decode the message headers. This, naturally, results in gibberish. Presumably, the start argument to vm-mime-transfer-decode-region in vm-yank-message needs to be changed to point to the actual start of the message body in the reply. I don't understand the vm internals well enough to know where this position information could be found -- is this (vm-mm-layout-body-start (car parts)) ? I hope this is helpful, and this can be fixed in vm-7.18! --lW1JyXw6pK Content-Type: message/rfc822 Content-Description: forwarded message Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="ks_c_5601-1987" Message-ID: <00da01c329fb$a347aee0$e9133b80@example.com> From: Example person <example@example.com> To: Jonathan Lennox <lennox@cs.columbia.edu> Subject: Example message Date: Tue, 3 Jun 2003 14:12:04 -0400 SGVyZSdzIHNvbWUgYmFzZTY0LWVuY29kZWQgdGV4dC4gIEl0J3Mgb3N0ZW5zaWJseSBlbmNv ZGVkIGluIGtzX2NfNTYwMS0xOTg3LApidXQgaXQncyByZWFsbHkgdXNpbmcgdGhlIEFTQ0lJ IHN1YnNldCBvZiB0aGF0IGVuY29kaW5nLiAK --lW1JyXw6pK--
Technical Details
Message-ID:
<bfk9ej$njf$1@news.Stanford.EDU>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,df7acda5b7139c3,start X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 2003-07-22 14:20:02 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!shelby.stanford.edu!not-for-mail From: jon@eyrie.org (Jonathan Lennox) Newsgroups: gnu.emacs.vm.bug Subject: VM displays base64 text but can't include it in followup. Date: Tue, 22 Jul 2003 21:13:55 +0000 (UTC) Organization: The Eyrie Lines: 69 Message-ID: <bfk9ej$njf$1@news.Stanford.EDU> NNTP-Posting-Host: haven.stanford.edu Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="lW1JyXw6pK" Content-Transfer-Encoding: 7bit X-Trace: news.Stanford.EDU 1058908435 24175 171.64.19.149 (22 Jul 2003 21:13:55 GMT) X-Complaints-To: news@news.stanford.edu X-Newsreader: trn 4.0-test70 (17 January 1999)