[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: eml attached file problem



On Tue, Jan 09, 2001 at 09:28:00PM +0100, Nicolas Bertolissio wrote:
> 
> On Sun, 07 Jan 2001 00:11:44 Eric G . Miller wrote:
> > On Sat, Jan 06, 2001 at 10:10:51PM +0100, Nicolas Bertolissio wrote:
> > > Hello,
> > > 
> > > I've a potato upgraded in woody, and I'm using balsa_0.9.5-1.0.pre5-1.
> > > I've received a mail with an attachment that is an .eml file format
> > > (see below). I can read html parts even if there are html tags but I'd
> > > like to see the image and I don't know how I can do. I tried to make a
> > > file with the data but it didn't work.  Could someone help me please ?
> > > 
> > > Nicolas.
> > 
> > Save each attached image to a file, then use uudecode to convert it from
> > ascii encoding.
> > 
> > Eric G. Miller <egm2@jps.net>
> 
> I think I had already tried this and forgot to mention it (but I tried again) with and without the following 3 lines :
> Content-Type: image/gif
> Content-Transfer-Encoding: base64
> Content-ID: <002401c073e7$d5761860$7aab3ed4@CDROM>
> 
> but I get :
> ~$uudecode image.uu
> uudecode: image.uu: No 'begin' line
> 
> any idea ?

well, as it says in the transfer-encoding header, it's base64-encoded,
which is similar to, but not the same as uuencoded...

I don't really understand why you can't convince your MUA to do the
conversion for you ;-) but if you want to, you can also do it by hand
with the following short perl script:


#!/usr/bin/perl -n

($s) = m#^([A-Za-z0-9+/]+)\s*$# or next;
$s =~ tr#A-Za-z0-9+/# -_#;
$len = pack("c", 32+0.75*length($s));
print unpack("u", $len.$s);


Copy these lines into a file, e.g. "base64dec.pl", make it executable
and call it like this

base64dec.pl in.base64 >out.gif

"in.base64" is your chunk of cryptic-looking data you're having
problems with. It should consist of the part *between* the separator
lines (there should be two identical lines, one above the "Content-*"
lines and one below the data block) -- use an editor to cut out the
block in between.

If everything works as expected you should be left with your image
file. If not, let me know.
Good Luck!

Erdmut



-- 
Erdmut Pfeifer
science+computing gmbh

-- Bugs come in through open windows. Keep Windows shut! --



Reply to: