nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] Patch: parse RFC-2822 quoted-string and quoted-pair


From: Oliver Kiddle
Subject: Re: [Nmh-workers] Patch: parse RFC-2822 quoted-string and quoted-pair
Date: Tue, 16 Dec 2003 18:27:23 +0100

Carl Mummert wrote:
> What you say is completely correct according to the RFC.  But look at
> the following headers from a message in my inbox:
> 
>    To: "'C Mummert'" <address@hidden>

I'm going to agree with Robert Elz here. I'd really like to see some
way of removing quoting but I think it would be better if unquote() did
everything purely according to the RFC.

Adding support for the second quote character has needlessly made the
code much more complicated because you're worrying about nested quotes.
It would be better implemented as Robert suggests. That gives you
the string without rfc822 quoting. If you really want to remove extra
outlook single quoting that would be better done as a second stage
afterwards. Preferably by just looking if the first and last characters
are single quotes and, if so, removing them (i.e. safely handle the
O'Tool & O'Sullivan example).

I can understand why you want to remove single quotes. Perhaps we can
have a second function to be applied after unquote(). Is there any
possible way of having a regex search and replace function? Removing
single quotes is an odd special case and a more general solution would
be nicer.

Oliver




reply via email to

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