From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/19080 Path: main.gmane.org!not-for-mail From: Matt Armstrong Newsgroups: gmane.emacs.gnus.general Subject: MIME decoding broken on Win NT Date: 23 Nov 1998 12:51:36 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 X-Trace: main.gmane.org 1035157495 9736 80.91.224.250 (20 Oct 2002 23:44:55 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 20 Oct 2002 23:44:55 +0000 (UTC) Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id PAA05589 for ; Mon, 23 Nov 1998 15:53:31 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.1/8.9.1) with ESMTP id OAB18800; Mon, 23 Nov 1998 14:53:11 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Mon, 23 Nov 1998 14:53:01 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id OAA18429 for ; Mon, 23 Nov 1998 14:52:41 -0600 (CST) Original-Received: from CAraptorUU.geoworks.com (CAraptorUU.geoworks.com [208.232.87.36]) by sclp3.sclp.com (8.8.5/8.8.5) with SMTP id PAA05547; Mon, 23 Nov 1998 15:52:22 -0500 (EST) Original-Received: from maelstrom.geoworks.com by CAraptorUU.geoworks.com via smtpd (for sclp3.sclp.com [204.252.123.139]) with SMTP; 23 Nov 1998 20:51:51 UT Original-Received: from quark.geoworks.com (quark.geoworks.com [198.211.201.100]) by maelstrom.geoworks.com (8.8.6/8.8.5) with ESMTP id MAA25095; Mon, 23 Nov 1998 12:51:40 -0800 (PST) Original-Received: from ultraman.geoworks.com ([198.211.201.179]) by quark.geoworks.com (8.8.5/8.8.5) with ESMTP id MAA15617; Mon, 23 Nov 1998 12:51:40 -0800 (PST) Original-To: ding@gnus.org, bugs@gnus.org Original-Lines: 50 User-Agent: Gnus/5.070053 (Pterodactyl Gnus v0.53) Emacs/20.3 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:19080 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:19080 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