From: Teemu Likonen <tlikonen@iki.fi>
To: emacs-devel@gnu.org
Subject: Re: Problems in parsing message's "From" header
Date: Mon, 22 Jun 2009 13:58:57 +0300 [thread overview]
Message-ID: <8763eo3572.fsf@iki.fi> (raw)
In-Reply-To: <877hz48zxe.fsf@iki.fi> (Teemu Likonen's message of "Mon, 22 Jun 2009 10:56:13 +0300")
On 2009-06-22 10:56 (+0300), Teemu Likonen wrote:
> But if there are some non-latin letters it fails to parse the name
> part, for example:
>
> (mail-header-parse-address "Γιώργος Σεφέρης <address@invalid>")
> => ("address@invalid")
OK, I found another function, mail-extract-address-components, which can
parse the above address string:
(mail-extract-address-components "Γιώργος Σεφέρης <address@invalid>")
=> ("Γιώργος Σεφέρης" "address@invalid")
So, my problem actually went away. It's probably time to say the usual
"sorry for the noise", from my part at least. :-)
The problem in mail-header-parse-address is probably valid anyway:
> (mail-header-parse-address
> (mail-header-from message-reply-headers))
>
> Vector message-reply-headers has message's "From" field but person's
> name is not enclosed in double quotes. Hence mail-header-parse-address
> fails to parse the name.
>
> So, is this bug or "non-ideal behaviour" (a) in the function
> mail-header-parse-address (b) in the code which produces the vector
> message-reply-headers or (c) in the code which puts the "From" field
> in the buffer in the first place? About the item "c" I should add that
> in Gnus's Article buffer there are no double quotes around person's
> name.
>
> Thanks. I'm using up-to-date Emacs CVS/Git version:
>
> GNU Emacs 23.1.50.3 (i686-pc-linux-gnu, GTK+ Version 2.12.12) of
> 2009-06-22 on mithlond
prev parent reply other threads:[~2009-06-22 10:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-22 7:56 Problems in parsing message's "From" header Teemu Likonen
2009-06-22 10:58 ` Teemu Likonen [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8763eo3572.fsf@iki.fi \
--to=tlikonen@iki.fi \
--cc=emacs-devel@gnu.org \
/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.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).