[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Replying to UTF-8 (and others?)

From: Ken Hornstein
Subject: Re: [Nmh-workers] Replying to UTF-8 (and others?)
Date: Mon, 20 Aug 2012 16:00:02 -0400

>I'm trying to get just a little better result in crafting a reply 
>draft message.  I'm using Ken's very nice 'replyfilter' script and 
>recipe, which formats nearly all of the body of the message perfectly.
>But, I still get a little cruft in the body, thus
>  On 15 August 2012 at 15:36, 
> "=?utf-8?B?a2F0aHlyb3NlOTcyMjlAY29tY2FzdC5uZXQ=?=" <address@hidden> wrote:

So, these are RFC 2047-encoded headers.  nmh doesn't quite deal with them
perfectly.  We had a discussion about this a few months back here:


>And, the email headers in the draft aren't quite right
>  To: "=?utf-8?B?a2F0aHlyb3NlOTcyMjlAY29tY2FzdC5uZXQ=?=" <address@hidden>
>  Subject: Re: =?utf-8?B?UmU6IENhcmUgY29mZXJlbmNl?=

Actually, these ARE correct, in that they're exactly what was in
the message you're replying to.  Because we don't (yet) handle RFC
2047 encoding, the simplest thing to do here is leave them as-is.
Now you could use %decode() in your mhl.reply to make the message
body look better, and that shouldn't harm anything (actually, I see
that we do that already in the mhl.reply that we ship, so that
should be easy for you to change).

>In a message on this list from last May, as I understand it, if a
>message contains non-ASCII, then it needs to run through mhbuild
>prior to running through replyfilter.  It sounded to me that if
>the message had correct MIME headers, that replyfilter maybe
>could deal with that correctly without needing help from mhbuild.

Well, no.  replyfilter already has all of the smarts in it to decode
MIME content (although it occurs to me to ask - how are you putting the
person's From: header in your reply draft?  Via mhl.reply?  If so,
I'm surprised that even works ... although I suspect it only works
for messages with a single text/plain part).

I think what you're referring to is that _if_ you have a non-ASCII
locale, replyfilter will happily output text in your chosen locale,
BUT nmh by default assumes that your draft is only us-ascii; if it
has characters outside of us-ascii, then you need to run mhbuild so
it will get encoded and properly marked with the right character set.
You can always do the Ralph Corderoy trick as described here:


But that will interfere with things like nmh-attach.  I think for 1.6
we're going to set things up so mhbuild is always run for you, but
right now you have to run it yourself.  But that isn't relevant to your
problem right now.

>Would I be correct in assuming that a recipe of mhbuild with reply 
>filter would allow the email headers and the last bit of the email 
>body to correctly be converted into text/plain with a charset I can 
>read?  If so, then could someone please give me a little coaching 
>regarding applying mhbuild for this purpose?

I think what you want is some use of %decode(), but see above; you have
to be careful where you use it.  And if you're using mhl.reply to add
extra text to the beginning of a message, then like I said that's not
guaranteed to work always either.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]