Re: [evolution-patches] Fix address field display.



On Tue, 2004-01-06 at 19:11 +0000, David Woodhouse wrote:
> On Tue, 2004-01-06 at 14:02 -0500, Jeffrey Stedfast wrote:
> > John "D." Grahame <jdg company com>
> > 
> > is not a pretty way to display it, but is one of the ways to encode the
> > name part of the name-addr. We want that displayed as:
> > 
> > John D. Grahame <jdg company com>
> 
> I disagree. If John wanted to put his middle initial in quotes that is
> his perogative, and we have no business removing them. It's free-form
> text and we should display what we were given.

*sigh* that's just it, he DIDN'T put it in quotes like that. The mailer
did it behind his back in order for the address to conform with rfc822's
address specification, as defined in Section 6.1

> 
> In _particular_, in the case of his name appearing as 
> 
> 	"Grahame, John" <jdg company com>
> 
> we must _not_ render that as
> 
> 	Grahame, John <jdg company com>
> 
> ... since that rendering would be very wrong, as it means something
> entirely different to the original.

"display nicely" does not necessarily mean it has to conform to the
rfc822 address specification. In fact, it *can't* conform to the address
specification because we want the encoded names to be decoded, and that,
by definition, is not compliant.

I think there is a function like camel_internet_address_format() or some
such that outputs a nicely formatted address list to a string.

> 
> > but more importantly, we want to rfc2047 decode the names too.
> 
> Isn't this what camel_header_decode_string() does for us?

no. there are 2 types of encodings (phrases vs free form text), both
have slightly different rules.

Jeff

-- 
Jeffrey Stedfast
Evolution Hacker - Ximian, Inc.
fejj ximian com  - www.ximian.com




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