#11739: ContentFile() does not support unicode data
-------------------------------------+-------------------------------------
     Reporter:  adamnelson           |                    Owner:  nobody
         Type:  Bug                  |                   Status:  reopened
    Component:  File                 |                  Version:  1.1
  uploads/storage                    |               Resolution:
     Severity:  Normal               |             Triage Stage:
     Keywords:                       |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by cody@…):

 * status:  closed => reopened
 * type:  Uncategorized => Bug
 * resolution:  worksforme =>


Comment:

 I'm running into this as well. It stems from the fact that cStringIO does
 not properly support unicode. The following code demonstrates the
 difference between StringIO and cStringIO:

 {{{
 >>> import StringIO
 >>> import cStringIO
 >>> StringIO.StringIO(u'test').read()
 u'test'
 >>> cStringIO.StringIO(u'test').read()
 't\x00e\x00s\x00t\x00'
 }}}

 This behavior has been discussed also in
 https://code.djangoproject.com/ticket/7990.

 I've attached a patch that changes the import such that it doesn't import
 cStringIO.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/11739#comment:6>
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 django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to