I was wondering why many mail programs do the following:
A user types an address of the form
"user name"<myac...@example.com>
Now those programs change this user input to
user name <myac...@example.com>
This seems incorrect to me. According to RFC2822, it would be correct to
change the user input to
"\"user name\""<myac...@example.com>
How do you see it?
Best Regards,
Oliver Block
Which is syntactically exactly equivalent.
> This seems incorrect to me. According to RFC2822, it would be correct to
> change the user input to
> "\"user name\""<myac...@example.com>
I don't know why you think that is the case. If the user wanted double
quotes to be part of the personal name, he would have applied the
backslash quoting.
Note that a period can not lead or end a word in an RFC 2822 phrase, thus
the only way to represent a name with an initial is by quoting:
"Bombastic J. Blurdybloop" <blurd...@example.com>
Although some parsers, including mine, will accept
Bombastic J. Blurdybloop <blurd...@example.com>
on user typein, this is technically an RFC 2822 syntax error and has to be
fixed up to apply the quotes when actually put into a message header.
I see no reason why a clueful user who types
"Bombastic J. Blurdybloop" <blurd...@example.com>
should be punished by having his messages go out as
"\"Bombastic J. Blurdybloop\"" <blurd...@example.com>
although apparently there is some defective-by-design software out there
that does that.
-- Mark --
http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
>> This seems incorrect to me. According to RFC2822, it would be correct
>> to change the user input to
>> "\"user name\""<myac...@example.com>
>
> I don't know why you think that is the case. If the user wanted double
> quotes to be part of the personal name, he would have applied the
> backslash quoting.
I think it is the case because the user usually does not care about the
escaping. He probably wouldn't even quotes.
Sometimes you read nick names between the first name and the surname,
e.g Mary "sunshine" Smith. This would produce "Mary \"sunshine\" Smith"
according to what I am saying.
> Note that a period can not lead or end a word in an RFC 2822 phrase,
> thus the only way to represent a name with an initial is by quoting:
> "Bombastic J. Blurdybloop" <blurd...@example.com>
>
> Although some parsers, including mine, will accept
> Bombastic J. Blurdybloop <blurd...@example.com>
> on user typein, this is technically an RFC 2822 syntax error and has to
> be fixed up to apply the quotes when actually put into a message header.
That's right.
>
> I see no reason why a clueful user who types
> "Bombastic J. Blurdybloop" <blurd...@example.com>
> should be punished by having his messages go out as
> "\"Bombastic J. Blurdybloop\"" <blurd...@example.com>
> although apparently there is some defective-by-design software out there
> that does that.
You should call them "clueful" programs. And because he is clueful the
user will adapt to the change soon, too.:)
It seems a consistant application of the rule "If you want a character
that is not allowed in atoms, I (the program) make it a quoted string.
If it is not allowed in the quoted string I (the program) make it a
quoted pair" (RFC2822) "If it even is not allowed in a quoted pairs I
make it an encoded word" (RFC2047 and others)
But I would agree with you that a programmer may decide that if there is
no need to use a quoted-string the program uses an atom if appropriate
(e.g. absence of SPACE).
Best regards,
Oliver