Patch for 'mysql_old' users... (unicode error)

Skip to first unread message

Jens Diemer

Sep 26, 2007, 9:01:15 AM9/26/07

On my SharedWebspace i have only a old MySQLdb version (v1.2.1g2) :(
So i must use mysql_old and i trapped into unicode errors.

The Problem is: The database results are not unicode.
There exists a ticket:

In this combination there is probably a problem with the Traceback. If a Unicode
error appears, the values in the traceback seems to be unicode. But this is not
true. The data from the database are byte strings.

I have made a Patch for the file ./django/db/backends/mysql_old/ to fix
the unicode problem. You can find the Patch in the ticket.

The solution is: All byte string results from the database must be decoded to

If you have the same Problem, you can use the patch from the ticket. If you have
trouble to apply the patch, mail me. I can send you the patched

Please let me know if this works for you or not.


Jens Diemer

A django powered CMS:

Reply all
Reply to author
0 new messages