#16052: MySQL: CharField's with utf8_bin collation return as str, should return as unicode. ----------------------------+---------------------------------------------- Reporter: graham_king | Owner: nobody Type: Bug | Status: new Milestone: | Component: Database layer (models, ORM) Version: SVN | Severity: Normal Keywords: mysql utf_bin | Triage Stage: Unreviewed unicode | Easy pickings: 0 Has patch: 1 | ----------------------------+---------------------------------------------- On MySQL, a !CharField with default collation comes out as unicode, but with utf8_bin it comes out as str.
Adding this line into the conversion dictionary (in django/db/backends/mysql/base.py) fixes it: {{{ FIELD_TYPE.VAR_STRING: [(None, force_unicode)], }}} Patch includes two tests in regressiontests/backends/. The full test suite passes with this patch applied. -- Ticket URL: <https://code.djangoproject.com/ticket/16052> 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.