Sujet : Re: How to convert <binaryGlowMixedWithASCII> to pure ASCII
De : * (at) *nospam* eli.users.panix.com (Eli the Bearded)
Groupes : comp.unix.shellDate : 05. May 2025, 00:28:55
Autres entêtes
Organisation : Some absurd concept
Message-ID : <eli$2505041904@qaz.wtf>
References : 1 2
User-Agent : Vectrex rn 2.1 (beta)
In comp.unix.shell, Lew Pitcher <
lew.pitcher@digitalfreehold.ca> wrote:
On Sun, 04 May 2025 18:15:38 +0000, Kenny McCormack wrote:
I have a string like (this was the "From" address of an email I recently received):
=?utf-8?B?UGhpbGxpcCBHw7xudGVy?= <s69pguen@uni-bonn.de>
This is called a "MIME word" or "MIME encoded word" Mail headers are
supposed to be 7-bit clean even when mail bodies can have 8-bit
encodings. MIME words exist to put quoted-printable and base64 in
headers.
=?utf-8?B?UGhpbGxpcCBHw7xudGVy?=
^^^^^ | ^^^^^^^^^^^^^^^^^^^^
Charset | Content
|
Encoding: "B" for base64 "Q" for quoted-printable.
:r! echo UGhpbGxpcCBHw7xudGVy | base64 -d
Phillip Günter
TF-8?q?They’re_telling_us_something_about_something_ok?
That one is rather mangled. It doesn't follow the =?%s?%c?%s?= format.
It also has a high-bit character in the content. But it does show the
quirk of MIME word quoted-printable: underscores used for spaces.
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.
Your mail program should. I have seen Python and Perl libraries for
decoding, too. Knowing the name should help you find them.
What you are looking at is the "punycode"[1] expression of a
non-ASCII character sequence.
No. Punycode is a entirely different coding used to put highbit content
in domain names (DNS). It is not base64 based.
https://en.wikipedia.org/wiki/MIME#Encoded-Wordhttps://en.wikipedia.org/wiki/PunycodeAs an example "Günter.com" encodes in Punycode as: xn--Gnter-kva.com
Someone has that registered, but it is blank in my browser.
Elijah
------
thinks Günter probably likes his name with the accent and not "pure ASCII"