qprint(1)

✨ qprint(1) β€” the glow-up ✨

okay bestie, gather round πŸ’– this is qprint, from the General Commands Manual, and she encodes/decodes files as RFC 1521 MIME Quoted-Printable. iconic behaviour, honestly.


🌸 NAME 🌸

qprint β€” encode / decode file as RFC 1521 MIME Quoted-Printable


πŸŽ€ SYNOPSIS πŸŽ€

qprint -d|-e [ options ] [ infile [ outfile ] ]

πŸ¦‹ DESCRIPTION πŸ¦‹

so. the MIME (Multipurpose Internet Mail Extensions) spec β€” RFC 1521 and all her successors β€” defines a whole mechanism for encoding text that's mostly printable ASCII but might be hiding characters that absolutely cannot show up as 7-bit ASCII. think accented letters in the ISO 8859 Latin-1 character set, or non-printable characters that would simply confuse mail transfer agents. messy. 😭

qprint is the command line utility that encodes and decodes files in this format. she can live inside a pipeline as an encoding or decoding filter, and honestly that's her most common gig β€” part of an automated mail processing system, iykyk. with the right options, qprint can encode pure binary files, but ngl she's a poor choice for that since she may inflate the size of the file by as much as a factor of three πŸ’€. the Base64 MIME encoding is a way better choice for that kind of data. periodt.


πŸ’… OPTIONS πŸ’…

  • -b, --binary β€” treat the input (when encoding) or the output (when decoding) 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 do the translation of end of line sequences that Quoted-Printable encoding normally performs. no cap.
  • --copyright β€” print program copyright information. ✨
  • -d, --decode β€” decodes the input, which was previously created by qprint, to recover the original input file. 🫢
  • -e, --encode β€” encodes the input into an output text file containing its qprint encoding.
  • -i, --ebcdic β€” encode ASCII characters for which no equivalent exists in the EBCDIC character set. this renders files more portable when they get transported to EBCDIC systems. πŸ’œ
  • -n, --noerrcheck β€” suppress error checking when decoding. by default, the moment she hits a non white space character that doesn't belong to the qprint set, or discovers the input file is incorrectly padded to a multiple of four characters, qprint issues an error message and terminates processing with exit status 1. the -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. she's just gonna look away πŸ™ˆ
  • -p, --paranoid β€” every character in the input file will be encoded as an escape sequence. you must also specify the -b or --binary option if you want end of line sequences 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. πŸ”₯
  • -u, --help β€” print how-to-call information.
  • --version β€” print program version information.

πŸ‘‘ EXIT STATUS πŸ‘‘

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.


πŸ“ FILES πŸ“

if no infile is specified, or infile is a single `-`, qprint reads from standard input; if no outfile is given, or outfile is a single `-`, output is sent to standard output. the input and output are processed strictly serially; consequently qprint may be used in pipelines. the program can process files of any size supported by the system containing text lines of arbitrary length. slay. 🌈


πŸ’€ 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. not her fault, it's the format's whole vibe.

please report bugs and documentation errors to bugs@fourmilab.ch. 🫢


⭐ SEE ALSO ⭐

base64(1), uuencode(1), RFC1521


🧚 AUTHOR 🧚

     John Walker
     http://www.fourmilab.ch/

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.

this is version 1.1 of qprint. the current version of this program may be downloaded from http://www.fourmilab.ch/webtools/qprint.


and that's the whole page, bestie πŸ’– brought to you by the 4th Berkeley Distribution, dated 16 DEC 2014 β€” mwah, take care of her, she's a legend πŸŽ€βœ¨