home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1996 October / PCO_10.ISO / filesbbs / uudecode.arj / UUSER.TXT < prev    next >
Encoding:
Text File  |  1996-09-05  |  15.4 KB  |  399 lines

  1. This file contains user documentation for the UUENCODE/DECODE pair.
  2.  
  3.  
  4. SUMMARY:
  5.  
  6. This package encodes and decodes "UUencoded files".  UUencoding is a
  7. popular technique for reliably sending binary files over communications
  8. systems.  Common binary files are "zip files" produced by pkzip, gif and
  9. jpg picture files, and doc files produced by word processors.  To send a
  10. binary file, UUencode the file and send it out with your favorite e-mail
  11. or communications program.  To receive the file, get the UUencoded
  12. version to your PC and UUdecode it.
  13.  
  14. There are many public domain UUencoders and decoders.  This pair was
  15. originally written in 1987 and has been kept up to date since; it is
  16. designed to handle just about anything you can throw at it with ease.
  17.  
  18. For more details on how to use the UUENCODE and UUDECODE programs, read
  19. this document.  For a technical description of the UUencode process, see
  20. UUTECH.TXT.
  21.  
  22.  
  23. SIMPLE, COMMON USE:
  24.  
  25. To decode a file, download it to your PC.  Give the filename an
  26. extension of ".UUE".  (ie: FOO.UUE); this aids you in identifying it as
  27. a uuencoded file.  If the file was sent out in multiple parts, put the
  28. part number on the end of the file name (ie: FOO1.UUE, FOO2.UUE, etc.).
  29.  
  30. Then enter: UUDECODE FOO
  31.  
  32. UUdecode will scan for variations of the name.  The name of the file
  33. to decode into is saved in the encoded file.
  34.  
  35. To encode a file, enter: UUENCODE filename
  36.  
  37. There are all kinds of options, which are described below; but you
  38. should ignore them if the above works for you.
  39.  
  40.  
  41. DISCLAIMER:
  42.  
  43. This program was written by me, Richard Marks, and it is copyrighted.
  44. Please see copyright notice in UUTECH.TXT.
  45. The program is freeware; but if used in a for profit situation, please
  46. contact me.
  47.  
  48. ************************************************************************
  49.  
  50. UUENCODE:
  51.  
  52. UUencode a file to send it out over a communications system (e-mail).
  53. Most e-mail systems limit the size of a single file.  A typical limit is
  54. 64 thousand bytes.  UUencode splits the encoded file into parts which
  55. can be sent out one at a time.  Thus a very large file gets sent out as
  56. a number of smaller files that are within size limits.
  57.  
  58. UUencode can automatically put checksum characters in the encoded file
  59. so the decode program can do validation.  (Modern communications systems
  60. are so reliable that one rarely sees a checksum error when decoding, but
  61. I still think it is a good idea to leave checksum-ing turned on just to
  62. be sure there are no problems.  This adds at most a few seconds to
  63. encoding and decoding times.)
  64.  
  65. The command:
  66.  
  67.     UUENCODE  [options]  input-file  [output-file]
  68.  
  69.     Popular options:
  70.        -c     - Do not create any checksums. (Checksums recommended!)
  71.  
  72.        -s     - Do NOT split the encoded file into sections.
  73.  
  74.        -s nnn - Split the encoded file into sections of nnn lines.
  75.                 Default is split into 950 line sections.
  76.  
  77.        -h nnn - Leave room in first section for nnn header (extra
  78.                 comment) lines.
  79.  
  80.        -x     - Use XX encoding (see below).
  81.  
  82.        -6     - Use Base64 MIME compliant encoding (see below).
  83.  
  84.     Less Popular options:
  85.        -o     - write to standard output, not to a file.
  86.                 No splitting is done in this case.
  87.  
  88.        -L     - Insert checksums on every line.  This is an old option
  89.                 for use with unreliable communication systems.
  90.  
  91.        -t     - Write the mapping table that was used into the encoded
  92.                 file (see below).
  93.  
  94.        -u     - Unix format file (Unix end of line character).
  95.  
  96.  
  97. INPUT FILE NAME:
  98.  
  99. The input file name must be supplied.  It is the name of the file to be
  100. encoded.  The file name and extension, but not the drive or path, is put
  101. in the encoded file.  This name is used by UUdecode to recreate a file
  102. with the same name.
  103.  
  104.  
  105. OUTPUT FILE NAME (of the encoded file):
  106.  
  107. This is an optional parameter.  Normally it is not needed.
  108.  
  109. Naming can get a little complicated if you are creating split files.  So
  110. let's take things in little steps.  (The problem is that in automated
  111. systems, there is a need for a variety of ways to specify file names.)
  112.  
  113. First, the normal case is with no output file name supplied:
  114.  
  115.         Output file name is input file name, with a ".UUE" extension.
  116.         Output is to the current directory; the drive & directory
  117.         of the input file is ignored.
  118.  
  119.         UUENCODE FOO.BAR  creates FOO.UUE
  120.  
  121. If you supply an output file name, it is used.  If the output file name
  122. you supply does not have an extension, ".UUE" is used.
  123.  
  124.         UUENCODE FOO.BAR  ABC.DEF  creates ABC.DEF
  125.         UUENCODE FOO.BAR  ABC      creates ABC.UUE
  126.         UUENCODE FOO.BAR  ABC.     creates ABC.
  127.  
  128. Note the subtly of the last example.  The "." after "ABC" is an
  129. extension of all spaces; so there is no extension on the output file.
  130. This differs from the second example where, since there is no ".", the
  131. default extension of ".UUE" is supplied.
  132.  
  133. Normally output goes to the directory you are in when you enter the
  134. UUencode command (the current directory).  This happens even if the
  135. input file is in some other directory.  But if a drive and/or directory
  136. is specified for the output file, it is used.
  137.  
  138. If you want to use the input file's drive & directory, use a directory
  139. of *\ for the output file.  The input file's drive & directory is used.
  140.  
  141.           UUENCODE ZZZ\FOO.BAR         creates FOO.UUE
  142.           UUENCODE ZZZ\FOO.BAR  ABC    creates ABC.UUE
  143.           UUENCODE ZZZ\FOO.BAR  *\ABC  creates ZZZ\ABC.UUE
  144.           UUENCODE ZZZ\FOO.BAR  *\     creates ZZZ\FOO.UUE
  145.  
  146.  
  147. SPLIT FILES and OUTPUT FILE NAMES:
  148.  
  149. UUencode checks the size of your file, if it is too small to split, the
  150. naming convention above is used.
  151.  
  152. Normally UUencode splits encoded files by putting a number after the
  153. file name.
  154.          UUENCODE FOO.BAR           creates FOO1.UUE, FOO2.UUE, etc.
  155.          UUENCODE FOO.BAR  *.ZZZ    creates FOO1.ZZZ, FOO2.ZZZ, etc.
  156.          UUENCODE FOO.BAR  ABC.ZZZ  creates ABC1.ZZZ, ABC2.ZZZ, etc.
  157.  
  158. Another popular way to name split files is with the extension of .001,
  159. .002, etc.  If you specify an output file extension of .001, then this
  160. naming convention is used.
  161.  
  162.         UUENCODE FOO.BAR  ABC.001   creates ABC.001, ABC.002, etc.
  163.         UUENCODE FOO.BAR    *.001   creates FOO.001, FOO.002, etc.
  164.  
  165. (I personally prefer to use the ".UUE" extension so I can determine that
  166. this is a UUencoded file from the file name; but some prefer the .001
  167. naming convention.)
  168.  
  169.  
  170. XXENCODING (the -x and -t options):
  171.  
  172. UUencode maps a binary file into a certain character set.  This
  173. character set goes through most communications systems with no problems.
  174. However some communications systems change some of the special
  175. characters used by UUencode.  For example the "{" character is changed
  176. into a "<" on some systems.
  177.  
  178. If you are having this sort of problem mailing to a friend, read on.
  179.  
  180. One could argue that it was a bad decision for UUencode to use
  181. characters that may be changed.  But many years ago, it was hard to find
  182. enough characters that could go over all communications systems
  183. unchanged.  Maybe 15 years ago, the character set that UUencode uses was
  184. a good choice; but today there are other options.
  185.  
  186. The XXencode option, is a better choice.  It uses characters that
  187. usually get through with no problems.  (It uses some lower case
  188. characters; lower case was not common on all computers 15 years ago.)
  189. Unfortunately, XXdecoders are not as commonly available as UUencoders.
  190. If the person you are mailing to has an XXdecoder, try the "-x" option
  191. on UUencode.  My UUdecoder automatically detects and handles XX encoded
  192. files.  Note that the default file extension is .XXE for XX encoded
  193. files.
  194.  
  195. Another option is to send out the mapping table that UUencode uses.
  196. Then whatever gets changed, gets changed in the mapping table and in the
  197. data, so the decode will decode correctly.  If the person you are
  198. mailing to has a UUdecoder that accepts mapping tables, try the -t
  199. option on UUencode.  You can use -x and -t together, but there is no
  200. reason to do this.  My UUdecoder handles mapping tables.  Note that if a
  201. file is changed, UUdecode will report an input file checksum error.
  202. This is OK as long as it does not report an output file checksum error
  203. (what comes out is the important thing).
  204.  
  205. Base64 (MIME Compliant) encoding:
  206.  
  207. There is a new generalized Mail system (MIME) that can use a variety of
  208. encoding techniques.  These include UU, XX, and a new slightly more
  209. efficient encoding method called Base64.  The -6 option enables this
  210. form of encoding.  It also disables all checksums and the table option.
  211.  
  212. Do not use this mechanism unless you are certain that the recepiant can
  213. handle it.  MIME decoders are not popular !
  214.  
  215. My uudecoder can accept Base64, but to make a little money, it is a
  216. $10 shareware option.  Please see my address below.
  217.  
  218. ************************************************************************
  219.  
  220. UUDECODE:
  221.  
  222. UUdecoding is the inverse of UUencoding.  The input is a UUencoded file
  223. or a several split UUencoded files.  The output is what the original
  224. UUencode started with.
  225.  
  226. This UUdecode automatically checks for just about everything.  It
  227. automatically handles split files, checksums, files packaged with the
  228. Unix 'sed' program, and UU or XX encoding.  But more importantly, over
  229. the years I have encountered many different minor problems and
  230. eccentricities of various communications systems.  (Even CompuServe and
  231. GEnie do, on occasion, insert some weird stuff in the middle of your
  232. files.)  This UUdecode handles all this sort of stuff.
  233.  
  234. In most cases you can just download a whole set of files as:
  235.      FOO1.UUE, FOO2.UUE, etc.
  236. then just enter:
  237.      UUDECODE FOO
  238. with no editing or anything else and "poof" the thing will decode.
  239.  
  240. The majority of decode problems are related to the PC learning curve
  241. (file naming and directories) or to downloading problems.  However
  242. sometimes you will have a problem situation which occurs when decoding
  243. files from one particular site.  This may require special procedures for
  244. handling files from just that site.
  245.  
  246. The typical site related problem is caused by a non-standard UUencoder.
  247. I have seen a lot of encoded files, but if you think there is a problem,
  248. please contact me.  (Contact info is at the end of this writeup.)
  249.  
  250. The command:
  251.  
  252.     UUDECODE  [options]  input-file  [output-file]
  253.  
  254.     popular options:
  255.         none - normally you do not use any options with UUdecode
  256.  
  257.  
  258.     less popular options:
  259.         -c/C - do not do any checksum testing.  If upper case "C",
  260.                checksum testing is done on the output file but not
  261.                on any input files (see below)
  262.  
  263.         -L   - do not do line level checks (see below)
  264.  
  265.         -s   - do not handle split files
  266.  
  267.         -i   - take input from stdin (implies -s)
  268.  
  269.         -u/x - use UU or XX decoding, do not do automatic analysis
  270.  
  271.  
  272.     options for use in automated systems (see UUTECH.TXT):
  273.         -e/E - call .bat file when decoding complete.
  274.  
  275.         -q   - quiet operation (no beeps)
  276.  
  277.         -y   - force "yes" response to all prompts.
  278.  
  279.         -y   - force "no" response to all prompts.
  280.  
  281.         -z   - use specific "cut" line.
  282.  
  283. Options can be entered in upper or lower case unless, like for c/C,
  284. there is a specific meaning for each case.
  285.  
  286.  
  287. CHECKSUM TESTING:
  288.  
  289. Normally you will want to run UUdecode with all checksum options on.
  290.  
  291. Occasionally you will encounter a file with junk appended to lines and
  292. UUdecode will display messages stating something is wrong with a
  293. specific line.  You may then accept or reject the line.  If you accept
  294. all the supposedly invalid lines and if the resultant file proves
  295. correct, run UUdecode with the -L option to suppress these errors.  Also
  296. let me know of the details as this is some unknown UUencoder that I want
  297. to handle.  See the "contact" section at the end of this document.
  298.  
  299. Some UUencoders insert checksum information in the encoded file.
  300. Checksum are a way to check the bits at a low level to make sure the
  301. resultant output file and the encoded input files are valid.  In many
  302. cases if the input file is bad, the output file is also bad.  But
  303. frequently the problem with the input file does not affect the output
  304. file.  If you get messages about checksum errors on input files and the
  305. output file is correct, run UUdecode with the -C (upper case) option to
  306. turn off input file checksum tests.
  307.  
  308. It is possible, but unlikely, that the output file may have checksum
  309. errors and still be acceptable.  You can turn off all checksum testing
  310. with the -c (lower case) option.  -C or -c imply the -L option.
  311.  
  312. FILE NAMING:
  313.  
  314. INPUT FILE NAME:
  315.  
  316. The problem with input file names is that you may be working with split
  317. files.  Perhaps file FOO.EXE is encoded in two parts and you have
  318. downloaded them as FOO1.UUE and FOO2.UUE.  If you supplied an input file
  319. name of FOO1.UUE, then UUdecode would find this file, decode it and go
  320. to FOO2.UUE automatically.
  321.  
  322. However, most users, myself included, have the mind set that they are
  323. working with file FOO and "forget all this other stuff please".  To
  324. handle this situation, UUdecode scans for several variations of the
  325. input file name you supply.
  326.  
  327. If you supply a file name with an extension, FOO.XYZ, that file name is
  328. used.  If not found, then UUdecode puts the number '1' after the file
  329. name (FOO1.XYZ) and UUdecode tries again.
  330.  
  331. The more common case is where just the file name, with no extension is
  332. supplied:
  333.         UUDECODE FOO
  334.  
  335. UUdecode tries the files in the following order:
  336.  
  337.         FOO.UUE
  338.         FOO.XXE         xx encoded file
  339.         FOO1.UUE
  340.         FOO1.XXE
  341.         FOO.001
  342.         FOO.01
  343.         FOO.1
  344.         FOO.
  345.         FOO1.
  346.  
  347. This may seem complicated, but it goes quickly.
  348.  
  349. A drive and path may also be supplied:
  350.  
  351.         UUDECODE C:\MYDIR\FOO
  352.  
  353. All the above rules apply.  But the given drive & directory is scanned.
  354.  
  355.  
  356. OUTPUT FILE NAME:
  357.  
  358. Normally the name of the output file is obtained from within the encoded
  359. file; it was put there when the file was encoded.  The decoded file is
  360. recreated with this file name.  The file is put into the current
  361. directory (the directory from which the UUdecode command is executed).
  362.  
  363. There are several conventions to alter this.
  364.  
  365. If you want to specify a specific output file name, optionally with
  366. drive and directory, specify it as the second file on the command line:
  367.  
  368.         UUDECODE FOO  c:\ABC\MYOUT.XXX
  369.  
  370. If you want to use the name from within the encoded file, but with a
  371. specific drive and directory, use the drive:directory with a '*' as the
  372. file name:
  373.  
  374.         UUDECODE FOO  c:ABC\*
  375.  
  376. If you want to use the drive and directory of the input file, use a '*'
  377. as the directory name:
  378.  
  379.         UUDECODE c:ABC\FOO   *\             file name from encoded file
  380.         UUDECODE c:ABC\FOO   *\NAME.NEW
  381.  
  382. ************************************************************************
  383.  
  384. CONTACTING THE AUTHOR:
  385.  
  386. You can mail me:
  387.         Richard Marks
  388.         931 Sulgrave Lane
  389.         Bryn Mawr, PA  19010
  390.         USA
  391.  
  392. If you encounter a problem I will need to see exactly what you are
  393. working with.  Please send me a diskette with whatever you think is
  394. important.  You can put a 3 1/2" diskette in an envelope with no special
  395. precautions and a single stamp.
  396.  
  397. You may telephone me at (610) 525-8993.  I am usually home after 7PM and
  398. stay up till 1AM - US Eastern Time; it is OK to call then.
  399.