Ralf Hildebrandt: > * Wietse Venema <wie...@porcupine.org>: > > > > But Exchange forgets the "" and just encodes > > > L?stn?me, Firstn?me > > > instead of > > > "L?stn?me, Firstn?me" > > > > > > thus the quoted-string encapsulation is wrong?! > > > > RFC822..RFC5322 do not need quotes around text inside the > > =?iso-8859-1?Q?stuff?=, as long as there are no spaces. That > > was an explicit design choice.
Actually spaces are OK. > So what IS the correct way? > > if (space or special characters in realname) > return encode(add_quotes(realname)) > else > return realname The rules for display names are in RFC*22. Look for the ABNF for display-name, phrase, word, and atom. Short answer: as long as =?iso-8859-1?Q?stuff?= looks like an RFC2822 atom, it needs no quoting. Wietse