From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Richard M. Stallman" Newsgroups: gmane.emacs.devel Subject: Re: base64 behavior is not MIME compliant Date: Sun, 03 Jul 2005 16:43:04 -0400 Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1120424295 15763 80.91.229.2 (3 Jul 2005 20:58:15 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 3 Jul 2005 20:58:15 +0000 (UTC) Cc: bugs@gnus.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 03 22:58:13 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DpBXJ-0003Af-CB for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2005 22:57:57 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DpBYU-0005gN-2L for ged-emacs-devel@m.gmane.org; Sun, 03 Jul 2005 16:59:10 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DpBV6-0004Ej-FE for emacs-devel@gnu.org; Sun, 03 Jul 2005 16:55:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DpBV4-0004E1-Pr for emacs-devel@gnu.org; Sun, 03 Jul 2005 16:55:39 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DpBUl-0003kW-MK for emacs-devel@gnu.org; Sun, 03 Jul 2005 16:55:20 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DpBQY-0000RV-Sh for emacs-devel@gnu.org; Sun, 03 Jul 2005 16:50:59 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1DpBIu-000279-1x; Sun, 03 Jul 2005 16:43:04 -0400 Original-To: Marc Horowitz In-reply-to: (message from Marc Horowitz on Sat, 02 Jul 2005 19:19:32 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:40260 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40260 RFC 3548 has this to say about characters not part of the encoding alphabet: Implementations MUST reject the encoding if it contains characters outside the base alphabet when interpreting base encoded data, unless the specification referring to this document explicitly states otherwise. Such specifications may, as MIME does, instead state that characters outside the base encoding alphabet should simply be ignored when interpreting data ("be liberal in what you accept"). Words such as "must" claim an authority we do not recognize in the GNU Project. We do not _obey_ standards--rather, we see what they have to say, consider their recommendations, then do what seems best. I believe the best fix is for base64-decode-region to take an optional argument which specifies how liberal it should be about it's input, defaulting to the current behavior, and for Gnus to use this argument. To decide whether to do this, we need to know the answers to three questions: Is there some situation in which the current behavior of base64-decode-region causes an actual problem or confusion for users? Is there some situation in which the current behavior provides an advantage? Also, how does the current development Emacs handle these things? Your report is based on 21.4; the current sources may be different. Of course, Gnus can fix this independently by using an external base64 implementation which is MIME-compliant. Theoretically it could, but that's a very undesirable thing to do, so we won't do that. If this calls for fixing, we should fix it in base64-decode-region; if not, we shouldn't fix what isn't broken, not in Gnus or anywhere else.