From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076341621697.tru64-unix-managers.marc@archive.invalid> From: Jean-Francois Vibert Date: Thu, 21 Nov 1996 18:19:28 +0000 To: tru64-unix-managers Subject: SUMMARY: Base64 encoding X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076341621697 My question was: > Dear gurus, > > Rather often, we get attached documents in Netscape mail, For example, > one of the last message on this list was attached with the > following characteristics: > > Name: lpr_osf32 > Type: unspecified type (application/octet-stream) > Encoding: base64 > > Evidently, saving it gives an encoded document, unreadable. > Since this was sent to the list devoted to DU, I suppose that a tool > exists to decode and read it. What tool? Where can I found it? Evidently I obtained answer in the minutes...Thank you very much to all that responded: Hellebo Knut Matti Saarinen Ron Lee Jon Craig Yizhong Zhou Masson Christophe Stephen B. Henry Oisin McGuinness Kevin Oberman Ollivier Robert Anthony Talltree The answers are: This is a MIME encoded mail. You need some MIME tools and/or a MIME mailer to deal with it. Use a MIME compliant mail (such as ELm-ME+ or Mutt or pine or metamail) ftp://ftp.ibp.fr/pub/unix/mail/mutt/ ftp://ftp.ibp.fr/pub/unix/mail/elm-me/ ftp://ftp.cac.washington.edu/pub/pine/pine3.95.tar.gz ftp://thumper.bellcore.com/pub/nsb/mm2.7.tar.Z ftp://ftp.funet.fi/pub/unix/mail/metamail/ or get mpack: ftp://ftp.andrew.cmu.edu:/pub/mpack or use Netscape: (In fact I use Netscape, but the configuration was bad. Now it works. Your answers led me to look at my Netscape config that was modified. Thanj you :-) ). or even use a perl script: #!/usr/local/bin/perl # BASE64 converter @a=@ARGV; die "$0 [-u] out\n" if $#a > -1 && ($a[0] ne '-u' || $#a > 0); $/=0; $_=; if ($a[0] =~ /u/) { s/[\s=]*//g; tr|A-Za-z0-9\+/|\0-\77|; $_=unpack('B*', $_); s/00(......)/$1/g; $l=length; $_=substr($_, 0, $l & ~7) if $l & 7; $_=pack('B*', $_); print; } else { $_=unpack('B*', $_); s/(......)/00$1/g; $l=length; if ($l & 7) { $e = substr($_, $l & ~7); $_ = substr($_, 0, $l & ~7); $_ .= "00$e" . '0' x (6 - length $e); } $_=pack('B*', $_); tr|\0-\77|A-Za-z0-9\+/|; while ($i