On Tue, 25 Feb 2003, Timo Sirainen wrote: > On Tue, 2003-02-25 at 20:42, Mark Crispin wrote: > > > If there's no charset in Content-Type, I don't send it. uw-imap seems to > > > send us-ascii if content-type is text/*. > > There is no such thing as a standards-compliant message without a charset > > that is not also US-ASCII. > But is there a reason to send it? I don't see it mentioned anywhere that > charset should always be sent with text messages. Client could default > it to US-ASCII just as well if it's not there.
The general philosophy of IMAP has been not to expect the client to default anything. Note, for example, that Sender and Reply-To fields are always filled in ENVELOPE. MIME requires that a TEXT/PLAIN Content-Type have a CHARSET parameter. A missing parameter is non-compliant. An IMAP client can reasonably conclude that a BODYSTRUCTURE with type TEXT and subtype PLAIN will therefore have a CHARSET parameter. Of course, a non-MIME message won't have a Content-Type at all. The IMAP document doesn't say it what to do in this case (it probably should), but the formal syntax makes it clear that the BODYSTRUCTURE can't be NIL, and the definition of BODY indicates that such messages have a part 1. The correct behavior is therefore to generate appropriate BODYSTRUCTURE data, treating it as a legacy non-MIME message. The only compliant thing is to give it a CHARSET of US-ASCII. -- Mark -- http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate.
