Sujet : How to convert <binaryGlowMixedWithASCII> to pure ASCII
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shellDate : 04. May 2025, 19:15:38
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vv8asa$2nscb$1@news.xmission.com>
User-Agent : trn 4.0-test77 (Sep 1, 2010)
I am often faced with this problem.
I have a string like (this was the "From" address of an email I recently received):
=?utf-8?B?UGhpbGxpcCBHw7xudGVy?= <
s69pguen@uni-bonn.de>
Note that this may not be the ideal example, but it is the one closest to
hand. Here's another example:
TF-8?q?They’re_telling_us_something_about_something_ok?
when it should have been just:
They're telling us something about something ok?
My question is: Is there a (Unix/Linux) tool that will reliably fix this?
I.e. convert the binary glop format into the desired, pure ASCII, format.
Note: I have tried "iconv" and have had it work in some situations, but it
mostly doesn't do anything (i.e., is equivalent to "cat"). In particular,
one problem with "iconv" is that one of the parameters is the "from encoding",
and generally, this is unknown. You are just presented with the glop and
have to figure it out on your own. But even when I put in "-f UTF-8" in
the command lines (of iconv), with the above text as input, it still does
nothing useful.
-- He must be a Muslim. He's got three wives and he doesn't drink.