Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!uakari.primate.wisc.edu!aplcen!uunet!mcsun!ukc!slxsys!ibmpcug!dylan From: dylan@ibmpcug.co.uk (Matthew Farwell) Newsgroups: comp.editors Subject: Re: vi: search for or go to a line not of length n Message-ID: <1990Sep29.005055.28227@ibmpcug.co.uk> Date: 29 Sep 90 00:50:55 GMT References: <1744@m1.cs.man.ac.uk> Reply-To: dylan@ibmpcug.CO.UK (Matthew Farwell) Organization: The IBM PC User Group, UK. Lines: 48 In article <1744@m1.cs.man.ac.uk> zlsiial@cms.mcc.ac.uk (A.V. Le Blanc) writes: >>> Couldn't you get the guy to retransmit it? >Perhaps the original submission came from a site which, like mine, >truncates blank characters from the ends of all lines received. >I have never yet received a UUencoded file in the mail or by >ordinary FTP which I have been able to decode without preprocessing, >and that usually produces error messages anyway. UUencode shouldn't even have blanks in it. (see below) >The code used for UUencoding was simply badly chosen, and some >of us hope it will be changed. Tell me if I'm wrong, but this was my understanding of the uuencode algorithim. 3 8 bit bytes are taken from the file. These are mapped onto 4 8 bit bytes, and the top 2 bits of each character are padded with 0's ie: 11110110 11001001 10101001 gets converted to: 111101 101100 100110 101001 which then gets mapped to: 00111101 00101100 00100110 00101001 You then have ascii characters with values ranging between 0 and 63. In ascii, this still includes control characters and spaces, so 33 is added to these values. You now have a file of characters which range between 33 and 96. In ascii, these characters are all printable + therefore can be mailed without mailers barfing. The file is then split into lines about 60 characters long, and each line has a 'M' added to the front to stop mailers taking any ~'s as commands to the mailer. Main point of all this. UUencode adds 33 (not as would be expected 32) so as not to include the complications which come with having spaces in a file, which as seems to have happened in your case might get stripped from the end of a line. UUencode was designed to be as simple + robust as possible, for transferring files between systems. If you have a uuencode which includes spaces, change it. Dylan. -- Matthew J Farwell | Email: dylan@ibmpcug.co.uk The IBM PC User Group, PO Box 360,| ...!uunet!ukc!ibmpcug!dylan Harrow HA1 4LQ England | CONNECT - Usenet Access in the UK!! Phone: +44 81-863-1191 | Sun? Don't they make coffee machines?