Tian haili @ csdn
2012-07-31
The mime (multipurposeinternet Mail Extensions) is used when an email is uploaded or transmitted over the network ). Mail transmission can only deliver US-ASCII characters, and other characters in the mail must be
The quopri and base64 modules are both used for encoding and decoding, and base64 and quoted-printable are both common encodings in emails.
Quoted-printable: The English character is not processed except =. The other characters are encoded as = The
Copy codeThe Code is as follows: # using System;
# Using System. Collections;
# Using System. Text;
#
# //
# // Class for encoding and decoding a string to QuotedPrintable
# // RFC 1521 http://www.ietf.org/rfc/rfc1521.txt
# // RFC 2045
MIME decoding class a class that implements MIME decoding this class implements the decoding method is decode ($ headnull, $ bodynull, $ content_num-1), in order to facilitate processing, the input is a two-character array. in the previous article,
The class that implements MIME decoding this class implements the decoding method is decode ($ headnull, $ bodynull, $ content_num-1), in order to facilitate processing, the input is a two character array, in our previous article, the POP class used
Introduction: This is a detailed page for PHP to implement POP3 mail decoding (3). It introduces PHP, related knowledge, skills, experience, and some PHP source code.
Class = 'pingjiaf' frameborder = '0' src = 'HTTP: // biancheng.dnbc?info/pingjia.
>>> "Hello". Encode ("hex")
' 68656c6c6f '
The corresponding can also
>>> ' 68656c6c6f '. Decode ("hex")' Hello '
Check the manuals, and these codec are available.
Codec
Aliases
Operand type
Purpose
Base64_codec
During network programming, you often need to print the received data in hexadecimal format for easy viewing. Today we found that there is such a simple method in Python.
>>> "Hello". encode ("hex ")'68656c6c6f'
You can also
>>> '68656c6c6f'.
>>> "Hello". Encode ("hex")' 68656c6c6f '
The corresponding can also
>>> ' 68656c6c6f ' decode ("hex")' Hello '
I checked the manuals, and these codec are available.
Codec
Aliases
Operand type
Purpose
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.