From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/38947 Path: main.gmane.org!not-for-mail From: Michael.Cook@cisco.com Newsgroups: gmane.emacs.gnus.general Subject: mm-qp-or-base64 Date: Wed, 26 Sep 2001 12:51:32 -0400 Sender: zzz@cisco.com Message-ID: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035174733 25271 80.91.224.250 (21 Oct 2002 04:32:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 04:32:13 +0000 (UTC) Return-Path: Return-Path: Original-Received: (qmail 12147 invoked from network); 26 Sep 2001 16:51:59 -0000 Original-Received: from frampton.cisco.com (161.44.253.15) by gnus.org with SMTP; 26 Sep 2001 16:51:59 -0000 Original-Received: from zzz.cisco.com (zzz.cisco.com [10.89.5.93]) by frampton.cisco.com (8.8.8/2.6/Cisco List Logging/8.8.8) with ESMTP id MAA08220 for ; Wed, 26 Sep 2001 12:51:32 -0400 (EDT) Original-Received: (from zzz@localhost) by zzz.cisco.com (8.11.6/8.11.6) id f8QGpWK16906; Wed, 26 Sep 2001 12:51:32 -0400 Original-To: ding@gnus.org User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 Original-Lines: 26 Xref: main.gmane.org gmane.emacs.gnus.general:38947 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:38947 pdf files often seem to look like plain text files because they tend to contain a lot of "text" characters, especially at the beginning of the file. but pdf files also usually contain a lot of "binary" characters. in other words, mm-qp-or-base64 tends to return 'quoted-printable for pdf files, but it should probably return 'base64. should we make mm-qp-or-base64 smarter? maybe use something like (goto-char (point-min)) (if (looking-at "%PDF-") 'base64 ...) suitably generalized, of course. maybe with: (defvar mm-content-transfer-encoding-smart-defaults '(("\\`%PDF-" base64)) "Alist of regexps to match against the beginning of a buffer to determine which encoding to use. If none of these regexps matches, then a heuristic is applied to choose between quoted-printable and base64.") or maybe this idea could be folded into mm-content-transfer-encoding-defaults somehow. m.