From: Matt Armstrong <matta@geoworks.com>
Subject: MIME decoding broken on Win NT
Date: 23 Nov 1998 12:51:36 -0800 [thread overview]
Message-ID: <uk90mf7zb.fsf@ultraman.geoworks.com> (raw)
MIME decoding is broken again under Win NT (it got fixed somewhere
around 0.35, but broken somewhere since then). Under Win NT,
default-buffer-file-coding-system is undecided-dos, not
undecided-unix. There are places in the MIME handling within pgnus
where the default buffer-file-coding-system is used, so cr/lf
translation happens on binary stuff.
I sent myself a binary attachment consisting of two bytes: "\r\n".
Getting that to decode correctly (with the standard "1 b" key
sequence) involved this patch:
*** mm-decode.el.orig Mon Nov 23 11:52:04 1998
--- mm-decode.el Mon Nov 23 12:22:18 1998
***************
*** 447,453 ****
(when (or (not (file-exists-p file))
(yes-or-no-p (format "File %s already exists; overwrite? "
file)))
! (write-region (point-min) (point-max) file)))))
(defun mm-pipe-part (handle)
"Pipe HANDLE to a process."
--- 447,458 ----
(when (or (not (file-exists-p file))
(yes-or-no-p (format "File %s already exists; overwrite? "
file)))
! (let ((coding-system-for-write
! (if (equal "text" (car (split-string
! (car (mm-handle-type handle)) "/")))
! 'buffer-file-coding-system
! 'binary)))
! (write-region (point-min) (point-max) file))))))
(defun mm-pipe-part (handle)
But I still can't decode the picture of RMS in Lars' "MIME Test One"
e-mail, so some holes still exist.
I think a better fix would be a more systematic approach -- pouring
through the MIME stuff and making sure non "text/*" parts never get
processed in a buffer where default-buffer-file-coding-system is in
effect.
I'm using NT Emacs 20.3.1, base64.el, and no mailcap stuff.
--
matta
next reply other threads:[~1998-11-23 20:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-11-23 20:51 Matt Armstrong [this message]
1998-11-23 21:03 ` Shenghuo ZHU
1998-11-24 10:15 ` Lars Magne Ingebrigtsen
1998-11-24 8:50 ` Shenghuo ZHU
1998-11-24 19:13 ` Matt Armstrong
1998-11-24 19:31 ` Shenghuo ZHU
1998-11-24 20:19 ` Lars Magne Ingebrigtsen
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=uk90mf7zb.fsf@ultraman.geoworks.com \
--to=matta@geoworks.com \
/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).