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 Content-Transfer-Encoding Header and Encoding Methods
Previous Page
Pages in Current Topic/Section
1
2
Next Page
TCP/IP Electronic Mail Delivery Protocol: The Simple Mail Transfer Protocol (SMTP)
Next Topic/Section

MIME Extension for Non-ASCII Mail Message Headers
(Page 2 of 2)

MIME Encoded-Word Syntax

In the MIME non-ASCII header technique, the value of a regular header is replaced by a MIME encoded-word that has the following syntax:

=?<charset>?<encoding>?<encoded-text>?=

The strings “=?” and “?=” are used to bracket the non-ASCII header, which flags it as a MIME encoded header to the recipient's e-mail client. The other elements, separated by “?”, indicate how the non-ASCII text is encoded:

  • <charset>: The character set used, such as “iso-8859-1”.

  • <encoding>: Two different encoding types are defined, each represented by a single letter for brevity:

  • <encoded-text>: The non-ASCII text that has been encoded as ASCII using the encoding type indicated.

As you can see, this method is analogous to how a non-ASCII message body or body part would be encoded, but the information about the encoding has been condensed so everything can fit in a single header line. The “<charset>” parameter is somewhat analogous to the Content-Type header for a message body, but since headers can only contain text, it specifies what kind of text it is. The “<encoding>” parameter is clearly equivalent to the Content-Transfer-Encoding header.

Example Non-ASCII MIME Header

Here's an example of a non-ASCII header, using the GB2312 character set (for Chinese characters) and base64 encoding:

Subject: =?GB2312?B?u7bTrbLOvNPDwLn61bm74Q==?=

I hope that doesn't say anything inappropriate; I took it from a piece of spam e-mail I received once! J

Key Concept: In addition to its many functions for encoding a variety of data in e-mail message bodies, MIME provides a feature that allows non-ASCII information to be placed into e-mail headers. This is done by encoding the data using either quoted-printable or base64 encoding, and then using a special format for the header value that specifies its encoding and character set. This technique is especially useful for e-mail sent in languages that cannot be represented easily in standard ASCII, such as many Asian languages.


 


Previous Topic/Section
MIME Content-Transfer-Encoding Header and Encoding Methods
Previous Page
Pages in Current Topic/Section
1
2
Next Page
TCP/IP Electronic Mail Delivery Protocol: The Simple Mail Transfer Protocol (SMTP)
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.