ArticleslgStudy

science

Quoted-printable

Quoted-printable is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Quoted-printable rather than just read about it. In short: The Quoted-Printable encoding is an escape syntax that uses printable ASCII characters (alphanumeric and the equals sign =) to represent arbitrary binary data to enable transmission of 8-bit data over a 7-bit data path or, generally, over a medium which is not 8-bit clean. Historically, because of the wide range of systems and protocols that could be used to transfer messages, e-mail was often assumed to be non-8-bi…

Key takeaways

  • Quoted-printable belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Quoted-printable to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Quoted-printable from memory before moving on to harder problems.

Reference excerpt

The Quoted-Printable encoding is an escape syntax that uses printable ASCII characters (alphanumeric and the equals sign =) to represent arbitrary binary data to enable transmission of 8-bit data over a 7-bit data path or, generally, over a medium which is not 8-bit clean. Historically, because of the wide range of systems and protocols that could be used to transfer messages, e-mail was often assumed to be non-8-bit-clean – however, modern SMTP servers are in most cases 8-bit clean and support the 8BITMIME extension. It can also be used with data that contains non-permitted octets or line lengths exceeding SMTP limits. It is defined as a MIME content transfer encoding for use in e-mail. The Quoted-Printable encoding 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.

Introduction

MIME defines mechanisms for sending all 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. The 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. The Quoted-Printable encoding is reversible, meaning the original bytes and hence the non-ASCII characters they represent can be identically recovered. Quoted-printable and Base64 encoding are the two binary-to-text encoding methods defined in RFC 2045, part of the MIME RFCs. Quoted-Printable and Base64 are the two MIME content transfer encodings, if the trivial "7bit" and "8bit" encoding are 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 has many 8-bit characters, then Quoted-Printable becomes both unreadable and extremely inefficient. Base64 is not human-readable, but has a uniform overhead for all data and can be the more logical choice for binary formats or text in a script other than the Latin script. The trade-off for using Base64 instead of binary is a significant increase in the amount of data sent when using Base64.

Encoding Any 8-bit byte value may be encoded with 3 characters: an = followed by two hexadecimal digits (0–9 or A–F) 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. All printable ASCII characters (decimal values between 33 and 126) may be represented by themselves, except = (decimal 61, hexadecimal 3D, therefore =3D). ASCII tab and space characters, decimal values 9 and 32, may be represented by themselves, except if these characters would appear at the end of the encoded line. In that case, they would need to be escaped as =09 (tab) or =20 (space), or be followed by a = (soft line break) as the last character of the encoded line. This last solution is valid because it prevents the tab or space from being the last character of the encoded line. If the data being encoded contains meaningful line breaks, they must be encoded as an ASCII CR LF sequence, not as their original byte values, neither directly nor via = signs. Conversely, if byte values 13 and 10 have meanings other than end of line (in media types, for example), then they must be encoded as =0D and =0A respectively. Lines of Quoted-Printable encoded data must not be longer than 76 characters. To satisfy this requirement without altering the encoded text, soft line breaks may be added as desired. A soft line break consists of an = at the end of an encoded line, and does not appear as a line break in the decoded text. These soft line breaks also allow encoding text without line breaks (or containing very long lines) for an environment where line size is limited, such as the 1000 characters per line limit of some SMTP software, as allowed by RFC 821 and RFC 2821. A slightly modified version of Quoted-Printable is used in message headers. (See also MIME § Encoded-Word.)

Example The following example is a French text (encoded in UTF-8), with a high frequency of letters with diacritical marks (such as the é).

J'interdis aux marchands de vanter trop leurs marchandises. Car ils se font= vite p=C3=A9dagogues et t'enseignent comme but ce qui n'est par essence qu= 'un moyen, et te trompant ainsi sur la route =C3=A0 suivre les voil=C3=A0 b= ient=C3=B4t qui te d=C3=A9gradent, car si leur musique est vulgaire ils te = fabriquent pour te la vendre une =C3=A2me vulgaire.

=E2=80=94=E2=80=8AAntoine de Saint-Exup=C3=A9ry, Citadelle (1948)

This encodes the following quotation:

J'interdis aux marchands de vanter trop leurs marchandises. Car ils se font vite pédagogues et t'enseignent comme but ce qui n'est par essence qu'un moyen, et te trompant ainsi sur la route à suivre les voilà bientôt qui te dégradent, car si leur musique est vulgaire ils te fabriquent pour te la vendre une âme vulgaire.

See also Percent-encoding – data encoding in URLs, mostly used for text Numeric character reference – text encoding in SGML, HTML, and XML Rich Text Format § Character encoding – a component of text encoding

Notes

References

External links RFC 1521 (obsolete) RFC 2045 (MIME) RFC 2045 — 6.7. Quoted-Printable Content-Transfer-Encoding

Worked examples

Example 1 — a first encounter with Quoted-printable

Start with the simplest possible case. Write down what Quoted-printable claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Quoted-printable before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Quoted-printable ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Quoted-printable

In research
Quoted-printable appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Quoted-printable in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Quoted-printable is common in secondary-school and first-year university syllabi. It links to neighbouring topics Email, so understanding it makes those chapters shorter.
In everyday life
Look for Quoted-printable outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Quoted-printable in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Quoted-printable means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Quoted-printable out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Quoted-printable in simple terms?

The Quoted-Printable encoding is an escape syntax that uses printable ASCII characters (alphanumeric and the equals sign =) to represent arbitrary binary data to enable transmission of 8-bit data over a 7-bit data path or, generally, over a medium which is not 8-bit clean. Historically, because of…

Why does Quoted-printable matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Quoted-printable?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Quoted-printable.

Tags

  • Email

Keep exploring