Sujet : Re: How to convert <binaryGlowMixedWithASCII> to pure ASCII
De : gazelle (at) *nospam* shell.xmission.com (Kenny McCormack)
Groupes : comp.unix.shellDate : 12. May 2025, 13:20:43
Autres entêtes
Organisation : The official candy of the new Millennium
Message-ID : <vvsp2r$33sch$1@news.xmission.com>
References : 1 2
User-Agent : trn 4.0-test77 (Sep 1, 2010)
In article <slrn1023i84.2s2es.cmartin+
usenetYYMMDD@nyx2.nyx.net>,
Chuck Martin <cmartin+
usenetYYMMDD@nyx.net> wrote:
...
Try piping it into the following command:
>
perl -CS -MEncode -ne 'print decode("MIME-Header", $_)'
Bingo! Thanks very much.
That worked well on the other example I gave in the OP too (which was
actually more the focus of my query).
I still get the binary glop in place of the single quotes (The text
contains the word "They're", rendered as "They<binaryglop>re"). Note that
in the input string, <binaryglop> is (the literal string): =E2=80=99
which gets converted by your Perl program into the 3
characters with octal codes (as displayed by "od -bc"): 342 200 231
I can deal with this later problem myself via brute force with AWK, but it
would be nice if I didn't have to - i.e., if there were a complete solution
(i.e., one that does also the other half of the job).
-- Every time a Republican gets caught doing something illegal (i.e., just about everyday or two), they always immediately issue two simultaneous statements about it: 1) "I didn't do it" (Standard denial, which of course only cult-members pay any attention to) 2) "Here's how I did it and why I did it and why it shouldn't matter to you and why you should go back to watching sports on TV"