From xemacs-m  Thu Feb 27 19:04:01 1997
Received: from jupiter.scs.Ryerson.CA (root@jupiter.scs.Ryerson.CA [141.117.18.31])
	by xemacs.org (8.8.5/8.8.5) with SMTP id TAA10725
	for <xemacs-beta@xemacs.org>; Thu, 27 Feb 1997 19:03:59 -0600 (CST)
Received: by jupiter.scs.Ryerson.CA id <10827(2)>; Thu, 27 Feb 1997 20:04:13 -0500
From: Dave Mason <dmason@scs.Ryerson.CA>
To: xemacs-beta@xemacs.org
Subject: Re: Bug in vm
In-Reply-To: <QQcett02558.199702280027@crystal.WonderWorks.COM>
References: <199702271328.OAA09887@daedalus.tnt.uni-hannover.de>
	<kigene2xsje.fsf@jagor.srce.hr>
	<QQcetr02047.199702272348@crystal.WonderWorks.COM>
	<kiglo89u78u.fsf@jagor.srce.hr>
	<QQcett02558.199702280027@crystal.WonderWorks.COM>
X-Face: %Q_F^9R-:'3MM7eZ6@E.x@f\*bgatzGv-8d%I~L[p^.F)3QF{kq\UTsu|e#?)3FPwJNvPPB
 !s*He|-*M^p*~bh"Nywm5NLL\\Rl3r(hWHY*F:$/RdKV*bS";n&#\Ov@*=]mu\}6tP<lkW*7FT|:Dm
 9ejO^{)GHJdPQaa"C\<Ak`K27?328'V(u*|jAEZR9-z!o\^j:Cb&*tx_9\KbXD*2
Message-Id: <97Feb27.200413edt.10827(2)@jupiter.scs.Ryerson.CA>
Date: 	Thu, 27 Feb 1997 20:04:10 -0500

Kyle Jones writes:
> Hrvoje Niksic writes:
>  > Is this a MIME requirement, or a VM design decision?  Heiko's message
>  > could have been encoded quoted-printable just fine.
> 
> Mostly an accident.  There's one routine that looks at a message
> and decides what the non-opaque transfer encoding should be.  It
> returns "7bit", "8bit" or "binary".  There's another routine that
> uses that return value and decides what the final transfer
> encoding should be.  This routine doesn't get any information
> about NULs or anything else; it only knows that the non-opqaue
> encoding is "binary".  The only safe encoding for binary data is
> BASE64, so that's what it uses.

Surely not.  I don't know the whole spec, but I don't see why
quoted-printable can't encode a binary file.... it won't be a very
*efficient* encoding, perhaps.

It would seem to me that if only a small fraction of the message
requires escaping then quoted-printable is the right thing to do.  If
it's more, then use base64.  Hmmm... base64 takes 1.33 characters/byte
and q-p takes 3 for quoted characters, 1 for others, so if more than
1/6 of the characters need quoting then base64 is more efficient (if
my math is right).

1/6 seems like a reasonable tradeoff point.  Less than that, it
probably *is* text with stuff in it.  More than that, it probably *is*
binary.

My C$0.02.

../Dave

