Liste des Groupes | Revenir à cl python |
Cameron Simpson <cs@cskk.id.au> writes:Noted. That seems like the correct approach to me.If you're using the Python email module to parse (or construct) the>
message as a `Message` object I'd expect that to happen automatically.
I am using
email.message.EmailMessage
And you are right that encoding for the actual mail which is received isRight. Quoted-printable encoding for the transport.
automatically sorted out. If I display the raw email in my client I get
the following:
>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
...
Subject: =?utf-8?q?=C3=9Cbungsbetreff?=
...
Dies ist eine =C3=9Cbung.
I would interpret that as meaning that the subject and body are encodedYes.
in the same way.
The problem just occurs with the unsent string representation printed toYes, and I was thinking abut this yesterday. I suspect that `print(some_message_object)` is intended to transcribe it for transport. For example, one could write to an mbox file and just print() the message into it and get correct transport/storage formatting, which includes the qp encoding.
the terminal.
Les messages affichés proviennent d'usenet.