[sf-lug] HTML, <PRE></PRE>, <-- -->, email & mime encoded ...

Rick Moen rick at linuxmafia.com
Wed Oct 2 15:42:31 PDT 2019


Quoting Michael Paoli (Michael.Paoli at cal.berkeley.edu):

> Well, we can convert either of those back to the original.
> There are various ways to do that.  I used to use a handy
> mimencode utility.  But alas, that went away from the distro
> I was using ... and I quite liked it and used it a lot.  Ah,
> fear not ... I rather easily enough wrote my own similar utility
> and with same name ... well, at least reimplementing the features
> I actually used anyway.
> http://www.rawbw.com/~mp/perl/mimencode
> 
> So, then we can convert back easily enough,
> e.g. from our base64:
> mimencode -u

This much can be reliably done by the /usr/bin/base64 utility, part of
GNU coreutils.

Coreutils doesn't appear (on a quick check) to have an equivalent for
quoted-printable, but tcucodec(1), qprint(1), and reformime(1) look
suitable.

For quoting/unquoting HTML, I tend to just swear a bit and haul out
sed/awk, but a brief search unearthed recode(1) as a likely time-saver.


Of the above, the only one I know and keep in my figurative back pocket
is base64(1).  Because yay coreutils.






More information about the sf-lug mailing list