>>>>> "BS" == Bill Silvert <firstname.lastname@example.org> writes:
BS> While I agree on the training aspect, there is an option that could
BS> make life easier for many of us, which would be a filter to map MIME
BS> codes into ASCII.
This is not possible without either parsing the message completely or doing
a bad job and mangling good messages. The messages could be in
quoted-printable or 8bit or even base64 by the time they get to you, and if
they're in 8bit then what looks like a quoted-printable string is really
just an equals sign followed by two hex digits. You have to read (and
understand) the content type and the content-transfer-encoding before you
can do anything interesting. And if the content-type is multipart, you
have to recursively parse the body to find more parts.
BS> I've been thinking of writing one of these myself (just map c-cedilla
BS> and e-acute into plain c and e for example), but if anyone has one
BS> already it would save me some time.
Well, there's Eryq's MIME::Latin1 module, but even he says that it was such
a bad idea that he doesn't want anyone using it. Imagine how rude it must
seem to people using any language but English to just mangle their text
into something that looks sort of like their text. (At least Eryq's module
tries to make the manglings visually reminiscent of the originals instead
of dropping the accents altogether.)
BS> Also, is there an easy way to install it into majordomo? Putting a pipe
BS> into the aliases and that sort of thiang seems pretty cumbersome.
Well, the simplest way really is to just put a pipe before the call to
resend. You could also wedge it in during the "caching the message" part
of resend if you wanted; you get every line of the message that way and can
do whatever you want before printing it out. Or you could call an external
munger just after the caching phase; at that point the message is stored in
a file called "$TMPDIR/resend.$$.in".