On 8/6/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote: > Robert Burrell Donkin ha scritto: > > On 8/4/07, Stefano Bagnara <[EMAIL PROTECTED]> wrote: > >> Should these strings be representable by a MailAddress: > >> [EMAIL PROTECTED] > >> a > >> ! > >> a@ > >> @b > >> @@ > >> [EMAIL PROTECTED] > >> [EMAIL PROTECTED] > >> [EMAIL PROTECTED] > >> <empty string> > >> [EMAIL PROTECTED] > > > > but this question is not about representation but parsing. MailAddress > > represents a user and host. provided that the information can be > > decoded then MailAddress should be able to represent them. > > > > ATM MailAddress performs parsing as well as representation. it > > represents a user and host but insists on parsing an input string > > which must be RFC822 compliant. > > > > a good example is the use of non-ASCII characters in address headers. > > this is not RFC822 compliant but could be reasonably parsed. > > > > - robet > > I'll rephrase the above question: > > - Which one of the above strings should be (in your opinion) parsed > without throwing a parsing exceptions? > > - What values do you expect to be represented as "user" and "host" after > a successfully parsing?
depends on the parser ;-) i would like a looser parser than accepts some UFT characters outside the domain - robert
