Re: fixing the current email module
"R. David Murray" <[email protected]> Fri, 9 Oct 2009 19:20:54 -0400 (EDT)
| Newsgroups | gmane.comp.python.mime.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 9 Oct 2009 at 13:26, Glenn Linderman wrote: > On approximately 10/9/2009 8:10 AM, came the following characters from the > keyboard of Stephen J. Turnbull: >> Glenn Linderman writes: >> > > > produce a defect report, but then simply converted to Unicode as if >> > > > it were Latin-1 (since there is no other knowledge available that >> > > > could produce a better conversion). >> > > >> > > No, that is already corruption. Most clients will assume that string >> > > is valid as a header, because it's valid as a string. >> > >> > Sure it is corruption. That's why there is a defect report. But >> > the conversion technique is appropriate, per the Postel principle. >> >> Actually, I would say you are emitting leniently, in violation of the >> Postel principle. > > You can say that, but I don't have to believe it. I'm talking about > accepting; the message has arrived, it is here, the client is trying to look > at it, and I'm talking about ways the client can look at not-quite-perfect > data, knowing that it is not quite perfect, but still being able to see it. > I'm not at all talking about emitting data. You seem to be calling the email > package helping the client to accept not-quite-perfect data, as a form of > emitting data. It is not. IMO, the appropriate way for the email package to provide the API you are talking about is it provide the client with a way to get at the raw byte string, which I think everyone agrees on. If the client wants to decode it as if it were latin-1 to process it, it can then do that. --David (RDM)