[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems in parsing message's "From" header

From: Teemu Likonen
Subject: Problems in parsing message's "From" header
Date: Mon, 22 Jun 2009 10:56:13 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

There's a small bug somewhere in parsing and handling messages' "From"
header. Here's some background information first. Function
mail-header-parse-address works like this:

    (mail-header-parse-address "Teemu Likonen <address@hidden>")
    => ("address@hidden" . "Teemu Likonen")

But if there are some non-latin letters it fails to parse the name part,
for example:

    (mail-header-parse-address "Γιώργος Σεφέρης <address@hidden>")
    => ("address@hidden")

If I put double quotes ("...") around the name it is parsed correctly:

    (mail-header-parse-address "\"Γιώργος Σεφέρης\" <address@hidden>")
    => ("address@hidden" . "Γιώργος Σεφέρης")

Maybe this is a feature but there is a little problem anyway: I use my
own function to insert citation line when replying to a message with
Gnus. The function is defined through variable
message-citation-line-function. To get person's name and address I have
this in my custom citation function:

     (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 (i686-pc-linux-gnu, GTK+ Version 2.12.12) of
    2009-06-22 on mithlond

reply via email to

[Prev in Thread] Current Thread [Next in Thread]