Please Whitelist This Site?

I know everyone hates ads. But please understand that I am providing premium content for free that takes hundreds of hours of time to research and write. I don't want to go to a pay-only model like some sites, but when more and more people block ads, I end up working for free. And I have a family to support, just like you. :)

If you like The TCP/IP Guide, please consider the download version. It's priced very economically and you can read all of it in a convenient format without ads.

If you want to use this site for free, I'd be grateful if you could add the site to the whitelist for Adblock. To do so, just open the Adblock menu and select "Disable on tcpipguide.com". Or go to the Tools menu and select "Adblock Plus Preferences...". Then click "Add Filter..." at the bottom, and add this string: "@@||tcpipguide.com^$document". Then just click OK.

Thanks for your understanding!

Sincerely, Charles Kozierok
Author and Publisher, The TCP/IP Guide


NOTE: Using software to mass-download the site degrades the server and is prohibited.
If you want to read The TCP/IP Guide offline, please consider licensing it. Thank you.

The Book is Here... and Now On Sale!

Enjoy The TCP/IP Guide? Get the complete PDF!
The TCP/IP Guide

Custom Search







Table Of Contents  The TCP/IP Guide
 9  TCP/IP Application Layer Protocols, Services and Applications (OSI Layers 5, 6 and 7)
      9  TCP/IP Key Applications and Application Protocols
           9  TCP/IP File and Message Transfer Applications and Protocols (FTP, TFTP, Electronic Mail, USENET, HTTP/WWW, Gopher)
                9  TCP/IP Electronic Mail System: Concepts and Protocols (RFC 822, MIME, SMTP, POP3, IMAP)
                     9  TCP/IP Electronic Mail Message Formats and Message Processing: RFC 822 and MIME
                          9  TCP/IP Enhanced Electronic Mail Message Format: Multipurpose Internet Mail Extensions (MIME)

Previous Topic/Section
MIME Composite Media Types: Multipart and Encapsulated Message Structures
Previous Page
Pages in Current Topic/Section
1
2
3
Next Page
MIME Extension for Non-ASCII Mail Message Headers
Next Topic/Section

MIME Content-Transfer-Encoding Header and Encoding Methods
(Page 2 of 3)

MIME Encoding Methods

To send non-ASCII data in MIME, it is necessary that it be encoded. The Content-Transfer-Encoding header is used to specify how a MIME message or body part has been encoded, so that it can be decoded by its recipient. The following types of encoding are defined:

  • 7bit: This indicates that the message is already in ASCII form compatible with RFC 822. It is the default and is what is assumed if no Content-Transfer-Encoding header is present.

  • 8bit / binary: These synonymous values mean the message has been encoded directly in 8-bit binary form. Yes, I did just say that this would violate the rules of RFC 822. These options appear to have been included to support future mechanisms for transporting binary data directly. RFC 1652 describes an SMTP extension that discusses this in part: SMTP Service Extension for 8bit-MIMEtransport (sic, there is no space between “MIME” and “transport”). However, the standard is clear that this still does not allow the transfer of raw binary data using SMTP and RFC 822.

  • quoted-printable: This is a special encoding that is used when most of the data is ASCII text, but when it contains certain violations of the rules of RFC 822. These illegal sections are converted using special encoding rules so the data as a whole is consistent with RFC 822.

  • base64: An encoding used to allow arbitrary binary data to be represented in ASCII form. The data is then sent as ASCII and decoded back into binary form by the recipient.

The quoted-printable and base64 encodings are the most interesting ones, because they are what allow non-RFC-822 data to be sent using RFC 822.

Key Concept: MIME supports four encoding methods: 7bit, 8bit (binary), quoted-printable and base64. 7bit encoding is standard ASCII and is used for text; quoted-printable encoding is for output that is mostly text but has some special characters that must be encoded; base64 is used for arbitrary binary files. (The 8bit encoding method is defined in MIME but not used for RFC 822 messages.)


quoted-printable Encoding

This encoding method is used when the message is “mostly” ASCII; only the problem bytes are encoded. The result is that RFC 822 compatibility is achieved while maintaining most of the data as regular text so it can still be easily understood by a human.

An example of where this would be letters with tildes or accents, such as those used in French or Spanish. Another would be a text message formed using an editor that inserts carriage return characters in the middle of a line. Most of the message is still text. The quoted-printable encoding can be used here, with the carriage return characters represented as “=0D” (the hexadecimal value of the character prepended by an equal sign). RFC 2046 contains more details on how this is done.


Previous Topic/Section
MIME Composite Media Types: Multipart and Encapsulated Message Structures
Previous Page
Pages in Current Topic/Section
1
2
3
Next Page
MIME Extension for Non-ASCII Mail Message Headers
Next Topic/Section

If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!
Donate $2
Donate $5
Donate $10
Donate $20
Donate $30
Donate: $



Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)
Version 3.0 - Version Date: September 20, 2005

Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.
Not responsible for any loss resulting from the use of this site.