I believe the bug is in exmh, not nmh.
The RFC2047 says that when decoding, you should ignore whitespace
between encoded words. Exmh doesn't handle this correctly. I can
understand, since it took me a long time to get this to work correctly
So if you have whitespace, it must be INSIDE of one of the encoded
words, or it will be removed upon decoding by nmh.
Check RFC2047. It is pretty clear on this matter.
The following patch fixes some problems with the way exmh encodes
- Whitespace between encoded words must be encoded. (Whitespace
between two encoded words should be ignored when the line is decded)
- "?", "=", and "_" within encoded words must be encoded.
("_" is translated to 0x20 (space) when the line is decoded.
"?" and "=" are used to separate the parts of an endoded word).