[Top][All Lists]

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

Re: mail-extract-address-components doesn't handle MIME-encoded full

From: Kevin Rodgers
Subject: Re: mail-extract-address-components doesn't handle MIME-encoded full name
Date: Fri, 09 May 2003 10:48:24 -0600
User-agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv: Gecko/20020406 Netscape6/6.2.2

mail-extract-address-components should either return the MIME-encoded full name so the caller can decode it

    ("=?iso-8859-1?q?Laurent=20Laporte?=" "address@hidden")

or decode it itself

    ("Laurent Laporte" "address@hidden")

Or perhaps the caller should decode the From: header contents first;

Apparently not (see attached message).

<a href="mailto:&lt;kevin.rodgers&#64;ihs.com&gt;";>Kevin Rodgers</a>
>From - Fri May  9 10:45:07 2003
X-Mozilla-Status: 0001
X-Mozilla-Status2: 00000000
From: address@hidden (Kyle Jones)
Newsgroups: gnu.emacs.vm.info
Subject: Re: mail-extract-address-components doesn't handle MIME-encoded full 
Date: Fri, 9 May 2003 02:21:24 +0000 (UTC)
Organization: Unknown
Message-ID: <address@hidden>
Sender: address@hidden
References: <address@hidden>
X-Face: /cA45WHG7jWq>(O3&Z57Y<"WsX5ddc,4c#w0F*zrV#=M
X-Complaints-To: address@hidden
Lines: 26
Xref: uni-berlin.de gnu.emacs.vm.info:15919

Kevin Rodgers  <address@hidden> wrote:
 > After I submitted a report to gnu.emacs.bug with the same subject, I
 > realized that it's probably better for VM to to decode the From: header
 > contents before calling mail-extract-address-components.

RFC 2047 advises against this because RFC 822 parsing rules are
no longer applicable to headers containing the decoded text.  If
mail-extract-address-components expects RFC 822 syntax (and I
think it does), then it could be broken by direct exposure to
decoded text.  The paragraph in the RFC 2046 I'm referring to is:

   NOTE: Decoding and display of encoded-words occurs *after* a
   structured field body is parsed into tokens.  It is therefore
   possible to hide 'special' characters in encoded-words which, when
   displayed, will be indistinguishable from 'special' characters in the
   surrounding text.  For this and other reasons, it is NOT generally
   possible to translate a message header containing 'encoded-word's to
   an unencoded form which can be parsed by an RFC 822 mail reader.

This is just for your information.  In practice the worse thing
that will happen is that someday mail-extract-address-components
might throw an error unexpectedly.

Latest VM: 7.15, see http://www.wonderworks.com/vm/
Latest snapshot: 1.04, see http://freshmeat.net/projects/snapshot/

reply via email to

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