[Top] [All Lists]

Parsing a header

2007-12-03 04:34:33

How do you think you should parse this header according to RFC 2822?

From: Joe \(Joseph\) Bloggs <joe(_at_)joe(_dot_)com>

My reading of RFC 2822 says that this is three "tokens", 'Joe', '\' and an unfinished comment '(Joseph) Bloggs <joe(_at_)joe(_dot_)com>'

As far as I can see you can have quoted pairs like '\)' in comments, but not outside comments, so the '\' before the '(' isn't a quoting '\' but a real '\'. Outside comments you use " characters for quoting.

Is this right, or am I missing something?

AFAICS, syntactically correct formations of the line could be:

From: "Joe (Joseph) Bloggs" <joe(_at_)joe(_dot_)com>
From: (Joe \(Joseph\) Bloggs) joe(_at_)joe(_dot_)com
or even
From: Joe (\(Joseph\)) Bloggs <joe(_at_)joe(_dot_)com>

<Prev in Thread] Current Thread [Next in Thread>