Gnus development mailing list
 help / color / mirror / Atom feed
From: Jan Rychter <jan@rychter.com>
Subject: Re: something decodes my headers...
Date: Wed, 11 Jun 2003 11:38:26 -0700	[thread overview]
Message-ID: <m2llw8zcgt.fsf@tnuctip.rychter.com> (raw)
In-Reply-To: <iluptlkx6ox.fsf@latte.josefsson.org> (Simon Josefsson's message of "Wed, 11 Jun 2003 12:13:50 +0200")

>>>>> "Simon" == Simon Josefsson <jas@extundo.com> writes:
 Simon> Jan Rychter <jan@rychter.com> writes:
 > "Simon" == Simon Josefsson <jas@extundo.com> writes:
 Simon> I think it might be a bug to invoke mail-extr on 8bit data.  Jan
 Simon> Rychter <jan@rychter.com> writes:
 > 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.
 >>
 Simon> Yes.  OTOH, I doubt the Right Thing wrt mail-extr is to patch
 Simon> it.  It should be rewritten.  But if there is a short patch that
 Simon> solve problems, I guess it doesn't hurt.  Removing the
 Simon> iso-8859-1 support is probably not a good thing in practice
 Simon> though, even if I agree in theory.
 >>
 >> I fully agree, although I'd love to see a "testing period" with the
 >> ISO-8859-1 support in mail-extr.el removed. Just so that people
 >> notice the problems.

 Simon> Since mail-extr.el isn't part of Gnus, this is hard to do here.
 Simon> Maybe suggest it on emacs-devel?  OTOH, I'm not sure what the
 Simon> result of the test period would be, it doesn't help if people
 Simon> just notice the problem, someone has to do something about it
 Simon> too, and they can do something about it without a test period,
 Simon> can't they?

mail-extr.el looks way too scary to me.

 >> No, the patch does not help. I do not mess with
 >> gnus-extract-address-components, it is left at default.
 >>
 >> Also, the messages in my nnml spool definitely do not have 8bit
 >> characters:
 >>
 >> From: =?iso-8859-2?Q?Pawe=B3_lastnamesnipped?= <spam@rychter.com>
 >>
 >> So, it seems that something decodes the From: field.

 Simon> I guess I missed something...

Found it.

  rfc2047-parse-and-decode("=?iso-8859-2?Q?Pawe=B3_lastname?=")
  mail-decode-encoded-word-region(1 944)
  article-decode-encoded-words()
  run-hooks(article-decode-encoded-words)
  gnus-request-article-this-buffer(45728 "nnml+private:in")
  gnus-article-prepare(45728 nil)
  gnus-summary-display-article(45728 nil)
  gnus-summary-select-article(nil force)
  gnus-summary-show-article(nil)
  call-interactively(gnus-summary-show-article)

And, just as a reminder, this results in:

  mail-extract-address-components("Paweł lastname <spam@rychter.com>")
  mm-dissect-buffer(nil nil)
  gnus-display-mime()
  gnus-article-prepare-display()
  gnus-article-prepare(96804 nil)
  gnus-summary-display-article(96804)
  gnus-summary-next-article(nil nil t)
  gnus-summary-prev-article(nil)
  call-interactively(gnus-summary-prev-article)

... which fails miserably with mail-extract-address-components returning
"Pawe" as the sender's name.

I think that gnus-request-article-this-buffer should not rfc2047-decode
headers before mail-extract-address-components sees them?

Can I hope for a fix from someone more knowledgeable?

--J.



  reply	other threads:[~2003-06-11 18:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-05 19:01 Jan Rychter
2003-06-05 21:53 ` Simon Josefsson
2003-06-11  0:20   ` Jan Rychter
2003-06-11  4:38     ` Simon Josefsson
2003-06-11  4:53       ` Jan Rychter
2003-06-11 10:13         ` Simon Josefsson
2003-06-11 18:38           ` Jan Rychter [this message]
2003-06-12 22:30   ` Dave Love
2003-06-12 22:38 ` Dave Love
2003-06-13  6:37   ` Simon Josefsson
2003-06-16  0:12     ` Jan Rychter
2003-06-17 22:26       ` Dave Love
2003-06-18  8:30         ` Jan Rychter
2003-06-17 22:17     ` Dave Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2llw8zcgt.fsf@tnuctip.rychter.com \
    --to=jan@rychter.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).