Sujet : Re: How to convert <binaryGlowMixedWithASCII> to pure ASCII
De : lew.pitcher (at) *nospam* digitalfreehold.ca (Lew Pitcher)
Groupes : comp.unix.shellDate : 04. May 2025, 19:23:31
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vv8bb2$2f5m5$2@dont-email.me>
References : 1
User-Agent : Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2)
On Sun, 04 May 2025 18:15:38 +0000, Kenny McCormack 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.
What you are looking at is the "punycode"[1] expression of a non-ASCII character
sequence.
AFAIK, there aren't any /standard/ utilities that convert to and from punycode.
However, there are /libraries/ that handle punycode (libidn[2], for one).
Perhaps a web search for IDN tools will come up with a punycode translator
program.
<snip>
[1]
https://www.rfc-editor.org/rfc/rfc3492.txt[2]
http://www.gnu.org/software/libidn/-- Lew Pitcher"In Skills We Trust"