On Tue, Aug 27, 2002 at 01:37:30PM -0700, Sam Peterson wrote: > > My console can display koi8-r. I receive a mail encoded in windows-1251 > > with an unquoted header. Mutt converts the body to koi8-r, and I can > > read the contents. However, Mutt doesn't know the header charset, so it > > is displayed without conversion, and I can't read it. For instance, 192 > > is Acyr in 1251, but I see it as yucyr with my koi8-r font. > > > > I wish I could specify the header charset manually (as I do with ^E for > > message bodies) so that Mutt could convert the subject and other fields. > > Using procmail/formail and iconv you might be able to accomplish > rewriting of the mail headers based on the sender so they are properly > escaped.
I've looked at procmail a while ago for body translation, but couldn't find a working solution. 1. All three inboxes I use are IMAP; how can I use procmail with it? I can define a macro that would do what I want, but how would it take the input, and where it should store the output? 2. Matching the messages by From: or To: isn't reliable since the same person can send messages in different encodings. E.g., message from a web-based client can be encoded in koi8-r and flagged as iso-8859-1, and message from a windows-based MUA can be encoded in windows-1251 and flagged as iso-8859-1. Let alone rare cases where the same person can send mail either in koi8-r or in iso-8859-9, both tagged as us-ascii. 3. What to do with raw 8-bit data in headers? I can't see how one can have formail convert it to quoted-printable. Of course, I can use other converters like iconv, but it would need to know current display charset and my guess about the message charset. Let's assume I can pass the former on ($charset) via the command line, and the latter is read from the keyboard; what about #1 above? That is why I think it would be much better to have manual charset override for headers, just like the one we have for bodies. IMHO, this functionality should be implemented in MUA. > Bottom line is, those senders are using broken mail clients. Though it > may seem anti-social, ya might want to drop a few hints to this. I > don't think mutt's the only mail client that would get confused by > such email. I completely agree. However, mutt is the best MUA with regard to bad input tolerance. I think it lacks this feature, which is already implemented in the source, but is inapplicable to headers. I would be happy to see it implemented. > * ^From: Evil Sender <[EMAIL PROTECTED]> In my case, it is brokenmailclients.com ;) . Thank you, I'll try that if I can find a way to execute that with a message on a remote mailbox. With kind regards, Baurjan.
