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

UUENCODE JPG and GIF




----------
From:  Kristian Ukkonen [SMTP:kukkonen-at-cc.hut.fi]
Sent:  Thursday, February 26, 1998 3:38 PM
To:  Tesla List
Subject:  Re: UUENCODE JPG and GIF

On Thu, 26 Feb 1998, Tesla List wrote:
> From:  gweaver [SMTP:gweaver-at-earthlink-dot-net]
> Sent:  Wednesday, February 25, 1998 2:14 PM
> To:  Tesla-at-pupman-dot-com
> Subject:  UUENCODE JPG and GIF
> 
> I have received about 70 jpg and gif coded files from people on the TC list
> that I can not view.
> 
> What is the reason for coding these files?  I have no trouble sending or
> receiving gif, jpg or zip files by email.

You CAN'T send binary files via e-mail. You CAN, however, send binary
files encoded into ascii files via e-mail. This is why we need encoding.
(see RFC for SMTP etc. for details) 

Some fancy programs allow user just to "attach" binary files to e-mail
messages and thus hide the encoding part. The receiver needs such fancy
program as well to escape the fun of decoding those encoded parts. Most
modern e-mail programs can handle these "attachments" and directly decode
them. If the mail progs can't handle this, user has to manually
decode the message.

There are not only uu(en/de)code but other systems as well
(binhex,pgp,mime,..) that may even offer strong encryption. 

Users with real operating systems :) can do all like this:
uuencode picture.pcx picture.pcx > picture.uue
cat picture.uue >> message.txt
mail kukkonen-at-cc.hut.fi < message.txt

> Some of the jpg files are made up of 5 or 6 coded email files.  How do I
> decode these files?  How do I decode several files at one time to make a
> complete picture?

Copy/paste all the parts together into same file and then
uudecode this one file. Remove non-uuencoded lines like
message header.

> I have a program called UNC.  If I save an email to the c:\unc directory and
> call it 001.wri then convert it to 001.txt I can decode it if it is only 1
> email file by typing the command line c:\unc\001.txt then enter.  That
> creates a file like sparkgap.jpg that I can view with Graphic Workshop.
> 
> For the multi email files I tried the command line c:\unc\*.* but that does
> not work.

Copy files 1.txt 2.txt 3.txt ... 10010101.txt into one file
called all.txt and uuencode this one file. Like this:

cat 1.txt > all.txt
cat 2.txt >> all.txt
...
cat 10010101.txt >> all.txt
uudecode all.txt

(replace cat with type for msdos. You could do it even
 fancier with pipes but this is trivial.)

> I tried to copy and paste all the emails into one txt file and name it a.txt
> then type the command line c:\unc\a.txt then enter but the file won't decode.

Remove all the extra lines (message headers etc.) so that only the
uuencoded file is left. 

> Does anyone know how this works?

Yes. >:)

   Kristian Ukkonen.

---------------------------------------------------------------------------
| Kristian Ukkonen       |  Do as thou wilt shall be the whole of the law |
| kukkonen-at-alpha.hut.fi  |_____  Chance favours the prepared mind  |-------
| http://www.hut.fi/~kukkonen |  Fear is the mind-killer  |---------
-----------------------------------------------------------              42