#19186: fail send utf-8 email
-----------------------------------+------------------------------------
     Reporter:  alex_po            |                    Owner:  nobody
         Type:  Bug                |                   Status:  new
    Component:  Core (Mail)        |                  Version:  master
     Severity:  Normal             |               Resolution:
     Keywords:  mail utf8 python3  |             Triage Stage:  Accepted
    Has patch:  0                  |      Needs documentation:  0
  Needs tests:  0                  |  Patch needs improvement:  0
Easy pickings:  0                  |                    UI/UX:  0
-----------------------------------+------------------------------------

Comment (by lukeplant):

 Just to confirm: stdlib `MIMEText` encodes unicode objects to bytestrings
 under Python 2.7:
 {{{
 In [4]: MIMEText(u"€", "plain", "utf-8").as_string()
 Out[4]: 'Content-Type: text/plain; charset="utf-8"\nMIME-Version: 1.0
 \nContent-Transfer-Encoding: 8bit\n\n\xe2\x82\xac'
 }}}

 But not under Python 3.2 or 3.3:
 {{{
 In [3]: MIMEText("€", "plain", "utf-8").as_string()
 Out[3]: 'Content-Type: text/plain; charset="utf-8"\nMIME-Version: 1.0
 \nContent-Transfer-Encoding: 8bit\n\n€'
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/19186#comment:2>
Django <https://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 https://groups.google.com/groups/opt_out.


Reply via email to