Cameron Simpson wrote on 07/10/12 at 08:52:35 +1000: > On 09Jul2012 17:12, Jack M <[email protected]> wrote: >> No, not yet anyway. If I eventually can, I'll try your suggestion of >> forcing mutt to emit utf-7; I presume that's what $send_charset is for. > > Presumably; I've never experimented with it.
Looks like perhaps $allow_8bit might be what to use. > But that will still only help for messages you yourself send; improving > VIM's behaviour should help with all messages undergoing this > transformation. For anyone wondering why not to just use $pipe-decode---If I rely on mutt to QP-decode via pipe, it will also weed headers, which I don't want. For any other vim users out there, here's how to solve this problem. First, here's why my QP-decoding in vim failed in this case. I was using a simple search and replace map that replaced things like "=C3" with nr2char(0xC3). I found these maps on the Vim Tips wiki (just search it for 'quoted-printable'). This works fine when what's QP-encoded is encodable in one byte. It chokes on, e.g., "=C3=B6", where it treats each hex number separately. The solution is to use a filter to something outside of vim; I got it to work with both python's "quopri" module (make a python script that applies it to stdin and gives it to stdout), and with a compiled binary called qprint[1]. Either way, what I did boils down to something like this: vnoremap ,Q :'<,'>!path-to-my-external-thingy-and-any-flags-needed<CR> (One must be careful that the vim range is NOT "%" or else the external tool will attempt to QP-decode the headers, which is a disaster. I also made a function that obviates the need to visually highlight the nonheaders by making the range start after the first blank line.) [1] http://www.fourmilab.ch/webtools/qprint/
