Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: 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 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