Delphi uses python to decode emails (reproduced)
It is estimated that many people, like me, will not be able to handle many bugs when using Indy, and have to use and modify it.
Recently, Indy has been used to send and receive emails, from D7 to d200
Python garbled, encoding, repr, encode, decode exploration, reprdecode# Encoding: UTF-8# Run the command lineS = 'Baidu'Print s # The output environment is gbk, encoded as UTF-8, and output garbled charactersPrint s. decode ('utf-8') # => the output
A lot of times when you write a Python program, you add such a line of code to your head.# Coding:utf-8Or is that so?# -*-coding:utf-8-*-Wait a minuteThis line of code means that the same encoding format is set to Utf-8The data stored in the
Transfer from Forum:
Http://club.topsage.com/thread-2468696-1-1.html
Perl starts to use utf8 encoding internally to represent characters starting from 5.6. That is to say, there should be no problem in processing Chinese characters and other
In the python source code file, if you are useful to non-ASCII characters, you need to make a declaration of character encoding at the head of the file, declared as follows:
# code : UTF - 8
Because Python only checks for #, coding,
Python uses the email module to encode and decode emails.
Decode emailsThe email module provided by python is very interesting. It can be used to encode and decode emails and is very useful for processing emails.Processing a mail is a very
Example: The word "yungojunhua. Phpurlencode is used at the beginning, and then javaurldecode, the word "quit" is called zookeeper. Use PHPbase64_encode, and then use javadecode (org. apache. commons. codec. binary. base64 package), & quot; success &
This article introduces to you is Python uses the email module to encode and decode the message, very detailed, with the same needs of small partners can refer to the next
Decode messagePython's own email module is a very interesting thing, it can
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
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.