From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/53095 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: something decodes my headers... Date: Wed, 11 Jun 2003 06:38:25 +0200 Sender: ding-owner@lists.math.uh.edu Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1055306202 12415 80.91.224.249 (11 Jun 2003 04:36:42 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 11 Jun 2003 04:36:42 +0000 (UTC) Cc: ding@gnus.org Original-X-From: ding-owner+M1639@lists.math.uh.edu Wed Jun 11 06:36:38 2003 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19PxLi-0003Dr-00 for ; Wed, 11 Jun 2003 06:36:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19PxNj-00012U-00; Tue, 10 Jun 2003 23:38:43 -0500 Original-Received: from sclp3.sclp.com ([64.157.176.121]) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 19PxNb-00012M-00 for ding@lists.math.uh.edu; Tue, 10 Jun 2003 23:38:35 -0500 Original-Received: (qmail 13925 invoked by alias); 11 Jun 2003 04:38:34 -0000 Original-Received: (qmail 13920 invoked from network); 11 Jun 2003 04:38:34 -0000 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net (HELO yxa.extundo.com) (217.13.230.178) by sclp3.sclp.com with SMTP; 11 Jun 2003 04:38:34 -0000 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.9/8.12.9) with ESMTP id h5B4cQB4019082 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Wed, 11 Jun 2003 06:38:27 +0200 Original-To: Jan Rychter Mail-Copies-To: nobody X-Payment: hashcash 1.2 0:030611:jan@rychter.com:2ce9c94a99ddf35a X-Hashcash: 0:030611:jan@rychter.com:2ce9c94a99ddf35a X-Payment: hashcash 1.2 0:030611:ding@gnus.org:3cb56da3e242818a X-Hashcash: 0:030611:ding@gnus.org:3cb56da3e242818a In-Reply-To: (Jan Rychter's message of "Tue, 10 Jun 2003 17:20:32 -0700") User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Precedence: bulk Xref: main.gmane.org gmane.emacs.gnus.general:53095 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:53095 Jan Rychter writes: > Simon> I think it might be a bug to invoke mail-extr on 8bit data. > > It is. It is really not designed to do that, and it only works for a > subset of ISO-8859-1. Actually, I have the distinct impression that if > we removed the 8859-1 support from mail-extr.el, the breakage would be > noticed by many more people. Yes. OTOH, I doubt the Right Thing wrt mail-extr is to patch it. It should be rewritten. But if there is a short patch that solve problems, I guess it doesn't hurt. Removing the iso-8859-1 support is probably not a good thing in practice though, even if I agree in theory. > Simon> Note that if it is bbdb that calls mail-extr, it is probably a > Simon> bug in bbdb. Chopped names could indicate a bug in rfc2047.el > Simon> though, there where bugs like this recently (perhaps not fixed? > Simon> I recall emacs bugs caused them). > > Well, interestingly enough, mail-extract-address-components is being > called TWICE whenever I enter a message. Once by Gnus, once by BBDB. In > both cases, an 8-bit string is being passed. Backtraces below, with the > name of the person in the From: field changed to my spamtrap: > > mail-extract-address-components("full 8bit name ") > mm-dissect-buffer(nil nil) I don't see where the MIME decoding occurs before m-e-a-c is invoked in that function. It just seems to invoke (mail-fetch-field "from") and then m-e-a-c on that string. Could it be that the incoming message had raw non-ASCII characters in it? Does this patch help? Assuming you leave g-e-a-c to its default value. --- mm-decode.el.~6.91.~ Fri Apr 25 01:07:04 2003 +++ mm-decode.el Wed Jun 11 06:37:37 2003 @@ -493,7 +493,8 @@ ;; creates unibyte buffers. This `if', though not a perfect ;; solution, avoids most of them. (if from - (setq from (cadr (mail-extract-address-components from)))))) + (setq from (cadr (funcall gnus-extract-address-components + from)))))) (when cte (setq cte (mail-header-strip cte))) (if (or (not ctl)