Sujet : Re: How to convert <binaryGlowMixedWithASCII> to pure ASCII
De : cmartin+usenetYYMMDD (at) *nospam* nyx.net (Chuck Martin)
Groupes : comp.unix.shellDate : 12. May 2025, 11:10:12
Autres entêtes
Organisation : NewsDemon - www.newsdemon.com
Message-ID : <slrn1023i84.2s2es.cmartin+usenetYYMMDD@nyx2.nyx.net>
References : 1
User-Agent : slrn/1.0.3 (Linux)
On 2025-05-04, Kenny McCormack <
gazelle@shell.xmission.com> wrote:
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.
Try piping it into the following command:
perl -CS -MEncode -ne 'print decode("MIME-Header", $_)'
For example:
chuck@sigma:~:10001% echo '=?utf-8?B?UGhpbGxpcCBHw7xudGVy?=' | perl -CS -MEncode -ne 'print decode("MIME-Header", $_)'
Phillip Günter
-- To reply via e-mail, replace "YYMMDD" with the current date in theappropriate format, or your mail will bounce. Removing the + andeverything that follows in my username will also cause your mail tobounce. Details: https://nyx.net/~cmartin/HowToEmailMe