nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] warning when attaching rfc822 message

2014-04-13 18:45:52
It looks like nothing had been called to set c_encoding before
InitMessage() is called.  I suspect that we're seeing this now
because attach used to use text/plain or application/octet-stream
in the past, but now it's using message/rfc822.

Okay, so I looked at this.  It looks like the simplest thing to do is
make init_decoded_content() set a default CTE (probably 7bit is appropriate).
The actual CTE is set in scan_content(), so having a default here would
make the various parts the code in mhparse.c happy (an example of how bad
the API is here; various parts of programs call into routines in mhparse.c
with wildly differing expectations).

But as always ... there's a wrinkle.  It looks like we always set a CTE
of 7bit for message/rfc822 parts.  But as I read it, that's not correct
if the message/rfc822 contains 8-bit characters; in that case it should be
8bit (or perhaps binary, but we don't really handle encoding anything in
binary).  Do other people agree with my reading of RFC 2046?  If so,
that change should be simple.

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>