From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65786 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: More liberal MIME decoding (unencoded question marks in encoded words) Date: Mon, 26 Nov 2007 23:08:30 +0100 Message-ID: References: Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196115165 14919 80.91.229.12 (26 Nov 2007 22:12:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 26 Nov 2007 22:12:45 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M14282@lists.math.uh.edu Mon Nov 26 23:12:52 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1IwmC0-0005kn-7i for ding-account@gmane.org; Mon, 26 Nov 2007 23:12:40 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1IwmAB-0002pJ-GI; Mon, 26 Nov 2007 16:10:47 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1IwmA9-0002p0-WE for ding@lists.math.uh.edu; Mon, 26 Nov 2007 16:10:46 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1IwmA3-0006R9-3p for ding@lists.math.uh.edu; Mon, 26 Nov 2007 16:10:45 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1IwmA0-00032q-00 for ; Mon, 26 Nov 2007 23:10:36 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1Iwm9r-0005wD-H1 for ding@gnus.org; Mon, 26 Nov 2007 22:10:27 +0000 Original-Received: from p54a969e3.dip.t-dialin.net ([84.169.105.227]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Nov 2007 22:10:27 +0000 Original-Received: from Reiner.Steib by p54a969e3.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Nov 2007 22:10:27 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 60 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p54a969e3.dip.t-dialin.net X-Face: 3Phac&+dw=IZHjhua]bp}LH<*p{qzj8u+ (rfc2047-decode-string "=?ISO-8859-1?Q?=foo?=") > "=foo" > (rfc2047-decode-string "=?ISO-8859-1?Q?foo??=") > "foo?" > (rfc2047-decode-string "=?ISO-8859-1?Q?foo?=?=") > "foo?=" > (rfc2047-decode-string "=?ISO-8859-1?Q?foo?==?ISO-8859-1?Q?bar?=") > "foobar" Do you see the other examples often in the wild? If not, I'd rather not make the decode too liberal. And we probably should have an option to toggle strict/loose decoding. BTW, another problem is that we "double encode" (`rfc2047-encode-encoded-words') such subjects: ELISP> (rfc2047-decode-string "=?ISO-8859-1?Q?foo??=") "=?ISO-8859-1?Q?foo??=" ELISP> (rfc2047-encode-string "=?ISO-8859-1?Q?foo??=") "=?us-ascii?Q?=3D=3FISO-8859-1=3FQ=3Ffoo=3F=3F=3D?=" AFAICS, Gnus (`rfc2047-encodable-p'?) simply looks for "=?". When found, the string is (double) encoded. I'm not sure if this behavior is wrong, but RFC2047 says the an encoded word is... ,----[ RFC2047 ] | Generally, an "encoded-word" is a sequence of printable ASCII | characters that begins with "=?", ends with "?=", and has two "?"s in | between. It specifies a character set and an encoding method, and | also includes the original text encoded as graphic ASCII characters, | according to the rules for that encoding method. `---- ..., i.e. shouldn't we use "=\\?.+\\?[qb]\\?.+\\?=" (or similar) instead of "=?"? Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/