emacs-pretest-bug
[Top][All Lists]
Advanced

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

mail-extract-address-components extracts only part from "From:"


From: Christoph Conrad
Subject: mail-extract-address-components extracts only part from "From:"
Date: Sat, 21 Dec 2002 13:35:30 +0100

In GNU Emacs 21.3.50.8 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2002-12-20 on linux
configured using `configure '--with-x''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: POSIX
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: address@hidden
  locale-coding-system: iso-latin-9
  default-enable-multibyte-characters: nil

I am using the latest Oort Gnus and have set
`gnus-extract-address-components' to CVS GNU Emacs function
`mail-extract-address-components'.

The following "From:"-String: "1&1 Internet AG" <address@hidden>

is parsed as follows:

* mail-extr.el from GNU Emacs 21 CVS:
(mail-extract-address-components "\"1&1 Internet AG\" <address@hidden>")
=> ("1" "address@hidden")

* "gnus-util.el" from Oort:
(gnus-extract-address-components "\"1&1 Internet AG\" <address@hidden>")
=> ("1&1 Internet AG" "address@hidden")

AFAIK the quoted string can contain any chars except "\"", so that
mail-extract-address-components doesn't parse the string correctly and
delivers in the car a "1" instead a "1&1 Internet AG".

According to RFC2822 the "1&1..." part above is a "phrase".

,----
| phrase          =       1*word / obs-phrase
| word            =       atom / quoted-string
| quoted-string   =       [CFWS]
|                         DQUOTE *([FWS] qcontent) [FWS] DQUOTE
|                         [CFWS]
| FWS             =       ([*WSP CRLF] 1*WSP) /   ; Folding white space
|                         obs-FWS
| qcontent        =       qtext / quoted-pair
| qtext           =       NO-WS-CTL /     ; Non white space controls
| 
|                         %d33 /          ; The rest of the US-ASCII
|                         %d35-91 /       ;  characters not including "\"
|                         %d93-126        ;  or the quote character
`----

According to that d38 ("&") has no special meaning.



reply via email to

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