Re: email address in a URI

Tim Kindberg wrote:

> The logic behind the above is:
> 0. Avoid obsolete local parts, and local parts involving CFWS

Yes

> 1. But enable as many email addresses allowed by RFC 2822 as
> possible

That chould be all if you really want it, but maybe draw the
line at some cases of quoted-pair within quoted-string, e.g.
a backslash + space pair or worse.

> 2. While ensuring RFC 3896 compatibility

Of course.

> 3. Can't %-encode characters without ambiguity, since RFC
> 2822 allows email addresses containing % HEX HEX constructs

IMHO it says "encode %, encode once", so you get %25 for % no
matter what came after the original %.

> 4. So we have to avoid / "^" / "`" / "{" / "|" / "}"

You could %-encode them.

> 5. And it seems a bad idea to allow "#" / "%" / "?"

You probably (?) have to encode # because you need it later
in your syntax, it's clear for %, maybe unnecessary for (?).

You didn't catch the quoted-string / quoted-pair stuff, e.g.
"not..me"@example, for more examples see RfC 3696 chapter 3
and table 1, add the missing DQUOTEs whenever it shows a \.

It's messy, you probably also have to encode DQUOTE and \.

"not@me"@example => %22not%40me%22@example
"oh\\no"@example => %22oh%5C%5Cno%22@example

                    Bye, Frank

Received on Friday, 8 July 2005 11:24:39 UTC