🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.atari16
Article #2293

The last line of UUENCODEd files

#2293
From: david moews
Date: Mon, 13 Oct 1986 18:52
31 lines
1832 bytes
In article <1346@lsuc.UUCP> jimomura@lsuc.UUCP (Jim Omura) writes:
>
>  ...I decoded it [UNITERM] last night and it didn't run.  The ending of the
>encode looks a bit funny to me.  The last line didn't start with
>an 'M' like the rest....

    The last (nonblank) line of UUENCODEd files doesn't have to start with an
'M'; the ASCII code of the first character in each line is 32 + the number of
bytes that the line will decode to (so 'M' = 45 bytes, after decoding).  Thus,
if the total number of bytes in the original file is not a multiple of 45,
the last nonblank line will be shorter than normal and will start with some
character other than an 'M'.  Here's an example:  I took the following 2 lines
(93 bytes)

This is a test file to demonstrate UUENCODE.
This is the second, and last, line of the file.

and UUENCODEd them; the result is

begin 644 file
M5&AI<R!I<R!A('1E<W0@9FEL92!T;R!D96UO;G-T<F%T92!5545.0T]$12X*
M5&AI<R!I<R!T:&4@<V5C;VYD+"!A;F0@;&%S="P@;&EN92!O9B!T:&4@9FEL
#92X*
 
end


.  The '#' in the last line indicates that after the 90 bytes contained in the
first two lines, there are 3 bytes left over.
--
David Moews     moews@husc4.harvard.edu    ...!seismo!harvard!husc4!moews
Technical Details
Message-ID: <389@husc6.HARVARD.EDU>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!rutgers!husc6!husc4!moews
References: <861009090656.000024EA.CALU.MA@UMass> <1346@lsuc.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!rutgers!husc6!husc4!moews
From: moews@husc4.harvard.edu (david moews)
Newsgroups: net.micro.atari16
Subject: The last line of UUENCODEd files
Message-ID: <389@husc6.HARVARD.EDU>
Date: Mon, 13-Oct-86 14:52:15 EDT
Article-I.D.: husc6.389
Posted: Mon Oct 13 14:52:15 1986
Date-Received: Tue, 14-Oct-86 06:10:53 EDT
References: <861009090656.000024EA.CALU.MA@UMass> <1346@lsuc.UUCP>
Sender: news@husc6.HARVARD.EDU
Reply-To: moews@husc4.UUCP (david moews)
Organization: Harvard Science Center
Lines: 31