Next: , Previous: shar compression, Up: shar Invocation

2.1.3 encoding options

specifying file encoding methodology. Files may be stored in the shar either as plain text or uuencoded. By default, the program selects which by examining the file. You may force the selection for all files. In intermixed option/file mode, this setting may be changed during processing.

mixed-uuencode option (-M).

This is the “decide uuencoding for each file” option.

This option has some usage constraints. It:

Automatically determine if the files are text or binary and archive correctly. Files found to be binary are uuencoded prior to packing. This is the default behavior for shar.

For a file to be considered a text file instead of a binary file, all the following should be true:

  1. The file does not contain any ASCII control character besides <BS> (backspace), <HT> (horizontal tab), <LF> (new line) or <FF> (form feed).
  2. The file contains no character with its eighth-bit set.
  3. The file contains no line beginning with the five letters "‘from ’", capitalized or not. (Mail handling programs will often gratuitously insert a > character before it.)
  4. The file is either empty or ends with a <LF> (newline) byte.
  5. No line in the file contains more than 200 characters. For counting purpose, lines are separated by a <LF> (newline).
uuencode option (-B).

This is the “treat all files as binary” option.

This option has some usage constraints. It:

Use uuencode prior to packing all files. This increases the size of the archive. The recipient must have uudecode in order to unpack. Compressed files are always encoded.

text-files option (-T).

This is the “treat all files as text” option.

This option has some usage constraints. It:

If you have files with non-ascii bytes or text that some mail handling programs do not like, you may find difficulties. However, if you are using FTP or SSH/SCP, the non-conforming text files should be okay.