Closed qsuscs closed 5 years ago
Works for me:
% mshow ./ebcdic.msg
From: Thomas Schneider <qsx@qsx.re>
Subject: This subject is in EBCDIC
To: Thomas Schneider <qsx@qsx.re>
Date: Tue, 04 Dec 2018 16:55:15 +0100 (1 hour, 5 minutes, 11 seconds ago)
--- 1: text/plain size=45 charset="EBCDIC-INT" render="mrecode | mflow -f" ---
The quick brown fox jumps over the lazy dog.
(I assume your libiconv can deal with EBCDIC? Try mshow -F
perhaps your mrecode is bad?)
Oh, now I see you use mflow without mrecode. That will be broken indeed. :)
Perhaps mrecode should be builtin to mshow, but it will need special code for dealing with text attachments then (e.g. we don't want to recode text/html beforehand).
Closing for now.
I just realized that as of commit 6710fd9 (which is older than this issue), this should not happen. Unless one uses filters: in that case, mshow does not convert its output to UTF-8. So indeed, when one uses e. g. mflow as filter for text/plain, mrecode should be added to the filter chain.
I’m not sure whether mshow should behave this way, but it does, anyway.
If you read this subject and ask yourself “What in the name of—?!”, yes, exactly. This is cursed and should really not be a real-world issue, but I still consider it a bug.
When invoked on a mail that contains EBCDIC-coded headers and body, mshow will decode and display the headers correctly; the body, however, not. I’m not really sure whether this is an issue with mshow or mflow.
Steps to reproduce: invoke mshow (with
text/plain: mflow
in.mblaze/filter
) on this mail.Results:
Your results may differ based on your locale and whatnot.
Expected results: the body should display “The quick brown fox jumps over the lazy dog.”