File: qprint.1

package info (click to toggle)
qprint 1.1.dfsg.2-2.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 592 kB
  • sloc: ansic: 715; sh: 152; makefile: 151
file content (149 lines) | stat: -rw-r--r-- 4,487 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
.TH qprint 1 "16 DEC 2014"
.UC 4
.SH NAME
qprint \- encode / decode file as RFC 1521 MIME Quoted-Printable
.SH SYNOPSIS
.B qprint
.BR \-d | \-e 
[
.I options
]
[
.I infile
[
.I outfile
] ]
.SH DESCRIPTION
The MIME (Multipurpose Internet Mail Extensions) specification
RFC 1521 and successors)
defines a mechanism for encoding text consisting primarily
of printable ASCII characters, but which may contain characters
(for example, accented letters in the ISO 8859 Latin-1
character set) which cannot be encoded as 7-bit ASCII or
are non-printable characters which may confuse mail transfer
agents.
.PP
.B qprint
is a command line utility which encodes and decodes files in this format.
It can be used within a pipeline as an encoding or decoding filter,
and is most commonly used in this manner as part of an automated
mail processing system.  With appropriate options,
.B qprint
can encode pure binary files, but it's a poor choice since it may
inflate the size of the file by as much as a factor of three.
The Base64 MIME encoding is a better choice for such data.
.SH OPTIONS
.TP 12
.BR \-b ", " \-\-binary
Treat the input (when encoding) or output (when decoding) file
as pure binary, and process end of line sequences as binary
data.  Encoding and decoding a file with this option preserves
the exact sequence of bytes in the input, but does not perform
the translation of end of line sequences normally performed by
Quoted-Printable encoding.
.TP
.B \-\-copyright
Print program copyright information.
.TP
.BR \-d ", " \-\-decode
Decodes the input, previously created by
.BR qprint ,
to recover the original input file.
.TP
.BR \-e ", " \-\-encode
Encodes the input into an output text file containing
its qprint encoding.
.TP
.BR \-i ", " \-\-ebcdic
Encode ASCII characters for which no equivalent exists in
the EBCDIC character set.  This renders files more portable
when transported to EBCDIC systems.
.TP
.BR \-n ", " \-\-noerrcheck
Suppress error checking when decoding.  By default, upon encountering
a non white space character which does not belong to the qprint
set, or discovering the input file is incorrectly padded to a
multiple of four characters,
.B qprint
issues an error message and terminates
processing with exit status 1.  The
.B \-n
option suppresses even this rudimentary error checking; invalid
characters are silently ignored and the output truncated to the
last three valid octets if the input is incorrectly padded.
.TP
.BR \-p " ," \-\-paranoid
Every character in the input file will be encoded as an
escape sequence.  You must also specify the
.B \-b
or
.B \-\-binary
option if you wish end of line sequences
to be escaped as well.  This option is a last resort when
there's no other way to transmit the file, but an encoding
explicitly designed for binary data such as
Base64 is a much more economical choice.
.TP
.BR \-u ", " \-\-help
Print how-to-call information.
.TP
.B \-\-version
Print program version information.
.SH EXIT STATUS
.B qprint
returns status 0 if processing was completed without errors, 1 if an
I/O error occurred or errors were detected in decoding a file which
indicate it is incorrect or incomplete, and 2 if processing
could not be performed at all due, for example, to a nonexistent input
file.
.SH FILES
If no
.I infile
is specified or
.I infile
is a single ``\-'',
.B qprint
reads from standard input; if no
.I outfile
is given, or
.I outfile
is a single ``\-'',
output is sent to standard output.  The input and
output are processed strictly serially; consequently
.B qprint
may be used in pipelines.
The program
can process files of any size supported by the system containing text
lines of arbitrary length.
.SH BUGS
Encoding a file with a large percentage of non-ASCII characters
may dramatically increase its size.  This is inherent in the
design of Quoted-Printable encoding.
.PP
Please report bugs and documentation errors to
.BR bugs@fourmilab.ch .
.SH "SEE ALSO"
.PD
.BR base64 (1),
.BR uuencode (1),
RFC1521
.ne 4
.SH AUTHOR
.RS 5
.nf
John Walker
http://www.fourmilab.ch/
.fi
.RE
.PD
.PP
This software is in the public domain.
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
without any conditions or restrictions.  This software is provided ``as
is'' without express or implied warranty.
.PP
This is version 1.1 of
.BR qprint .
The current version of this program may be downloaded from
http://www.fourmilab.ch/webtools/qprint.