*** Welcome to piglix ***

Quoted-printable


Quoted-Printable, or QP encoding, is an encoding using printable ASCII characters (alphanumeric and the equals sign =) to transmit 8-bit data over a 7-bit data path or, generally, over a medium which is not 8-bit clean. It is defined as a MIME content transfer encoding for use in e-mail.

QP works by using the equals sign = as an escape character. It also limits line length to 76, as some software has limits on line length.

MIME defines mechanisms for sending other kinds of information in e-mail, including text in languages other than English, using character encodings other than ASCII. However, these encodings often use byte values outside the ASCII range so they need to be encoded further before they are suitable for use in a non-8-bit-clean environment. Quoted-Printable encoding is one method used for mapping arbitrary bytes into sequences of ASCII characters. So, Quoted-Printable is not a character encoding scheme itself, but a data coding layer to be used under some byte-oriented character encoding. QP encoding is reversible, meaning the original bytes and hence the non-ASCII characters they represent can be identically recovered.

Quoted-Printable and Base64 are the two basic MIME content transfer encodings, if a trivial "8bit" encoding is not counted. If the text to be encoded does not contain many non-ASCII characters, then Quoted-Printable results in a fairly readable and compact encoded result. On the other hand, if the input is not mostly ASCII, then Quoted-Printable becomes both unreadable and extremely inefficient. Base64 is not human-readable, but has a uniform overhead for all data and is the more sensible choice for binary formats or text in non-Latin based languages.

Any 8-bit byte value may be encoded with 3 characters: an = followed by two hexadecimal digits (09 or AF) representing the byte's numeric value. For example, an ASCII form feed character (decimal value 12) can be represented by "=0C", and an ASCII equal sign (decimal value 61) must be represented by =3D. All characters except printable ASCII characters or end of line characters (but also =) must be encoded in this fashion.


...
Wikipedia

...