#5778: Email subjects not encoded properly
---------------------------------------------------------+------------------
Reporter: Thomas Petazzoni <[EMAIL PROTECTED]> | Owner: nobody
Status: new | Component: Core
framework
Version: SVN | Keywords:
Stage: Unreviewed | Has_patch: 0
---------------------------------------------------------+------------------
When providing an UTF-8 encoded subject to the EmailMessage class
constructor, the subject is sent directly in UTF-8, without being encoded
in Quoted-Printable or Base 64. When the MUA of the recepient is running
on a machine with UTF-8, it "works", but with recipients having their
machines running ISO-8859-x or other non-UTF-8 charset, the subject
appears broken.
I think the problem comes from the implementation of the __setitem__
method of the SafeMIMEText class. It only uses the Header() class when
str(force_unicode(val)) raises an exception, which it doesn't do in my
case (I suppose because my subject is properly UTF-8 encoded). However,
I'd say it should *always* use Header(), which properly turns an UTF-8
string to a quoted-printable string.
I'm running Django trunk at r6526.
Don't hesitate to ask for further details if needed.
--
Ticket URL: <http://code.djangoproject.com/ticket/5778>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---