#13682: Email attachments not support russian unicode symbols in filename and 
body
---------------------------------------+------------------------------------
          Reporter:  satels            |         Owner:  nobody       
            Status:  closed            |     Milestone:               
         Component:  django.core.mail  |       Version:  1.2          
        Resolution:  invalid           |      Keywords:  mail, unicode
             Stage:  Unreviewed        |     Has_patch:  0            
        Needs_docs:  0                 |   Needs_tests:  0            
Needs_better_patch:  0                 |  
---------------------------------------+------------------------------------
Changes (by kmtracey):

  * status:  new => closed
  * resolution:  => invalid

Comment:

 This attachment specification:

 {{{
            (u'Это файл 2.doc', u"Содержание второго файла\n",
 'application/msword')
 }}}

 looks wrong to me. Content of a real ms word .doc file would be a binary
 data, not a unicode string. A non-text attachment gets encoded in base64,
 and that's running into trouble when the payload is unicode instead of a
 bytestring. If you specify the attachment payload as a bytestring (and
 remove the netangels_headers and   autosubmitted arguments to
 `mail.EmailMessage` -- what are those? they are not accepted by Django's
 `mail.EmailMessage`), and actually define a test method so that setUp gets
 called, the test passes. So I think the correct fix is to properly specify
 the payload of a binary attachment as binary data, not a unicode string.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13682#comment:3>
Django <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.

Reply via email to