Quoted-Printable
Quoted-printable encoding should be used for data that is nominally text and human-readable but not “7-bit clean.” It is a way of transforming 8-bit or literal textual data into a 7-bit form for transmission by SMTP. Quoted-printable encoded text is protected in transit from mail gateways that might wrap the lines, change the tabs to spaces, or otherwise affect formatting that the sender would like to retain.
Once ASCII text has been quoted-printable encoded, it should still be mostly readable by a human being.
It is possible to encode some kinds of binary information with the quoted-printable encoding method. However, care must be taken to follow each of the encoding rules completely. In most cases, binary data should be encoded with the base64 method, instead.
When encoding text where linebreak locations matter greatly (such as source code for most languages), remember that mail system gateways on the Internet often alter the length of lines en route. When this would cause data corruption, the base64 method should be used.
Still, the quoted-printable method is preferred over base64 when its use is appropriate, since it is by far the more efficient encoding scheme in terms of resulting data length and computation effort.
To encode a bit stream with the quoted-printable method, first convert, if necessary, the bit stream into an octet stream.
An octet stream is subtly different from a bit stream. An octet is 8 bits, like an 8-bit byte. The earlier octets in the stream ...
Get Programming Internet Email now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.