Quoted printable encoding

from Wikipedia, the free encyclopedia

The quoted printable coding (from English quoted printable with quoted in the sense of masked , so “printable by masking”) - also called QP coding for short - is a process in which individual characters (or bytes ) are outside the ASCII character set specially translated (or coded ). It is a proposed Internet standard and has been described in RFC 2045 since November 1996 . It is mainly used as additional coding for e-mailsused because it has not yet been guaranteed that all intermediaries can process all 8-bit characters (corresponds to 256 possibilities per byte) when sending e-mails; the original email specification was only 7 bits (128 possibilities per byte).

more details

In order to still be able to use characters from the range 127-255 without endangering compatibility with older systems, these characters are also encoded. All bytes outside of the decimal ASCII ranges 9, 32–60 and 62–126 are replaced by a =symbol followed by the hexadecimal value of the byte. The =symbol is outside this range (ASCII value 61) and is therefore also =3Dcoded. It is particularly important to note that CR and LF must be shown in the form =0Dor =0A, unless they are to be used as a line break .

Allowed characters:

ASCII decimal code Allowed characters
9 Tabulatorzeichen
32-60 Leerzeichen and !"#$%&'()*+,-./0123456789:;<
62-126 >?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~

In addition, if the original line ended in a space (ASCII 32), this is =20encoded as. This guarantees both that transport mechanisms that remove spaces at the end of the line do not damage the data and that when a QP-encoded file is printed it can be seen how many spaces were at the end of the line. Accordingly, the tabulator character (ASCII 9) is often generally replaced by =09(although its integrity is actually guaranteed during mail transport) so that the printed form is absolutely clear.

In order to limit the length of the lines to 76 characters, a is usually placed =at the end of the line after 75 characters for longer lines and the text is continued in the next line. The line break enforced in this way is removed again during decoding.

example

Hätten Hüte ein ß im Namen, wären sie möglicherweise keine Hüte mehr,
sondern Hüße.

This text is coded as quoted-printable in the ISO 8859-1 character set :

H=E4tten H=FCte ein =DF im Namen, w=E4ren sie m=F6glicherweise keine H=FCte=
 mehr,
sondern H=FC=DFe.

You can see the coded umlauts and the forced line break after the word "hats", in which the space is moved to the next line. The originally existing line break after "more," is still present without an =at the end and is retained during decoding.

Web links

Single receipts

  1. On the safe side: Quoted Printable - Page 143 in Start with E-Mail - Easy: This is how the mail goes! at Markt und Technik , 2005; ISBN 3-8272-6933-4 .
  2. RFC 2045 - Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies (English) - IETF , November 1996.