# HG changeset patch # User adustman # Date 1236220850 0 # Node ID 5db99d9be0fb9deb7eb35251bfe762bbe311a3dd # Parent 6732437eb2ac9f6f7f88a41603d91426d2b533ed Fix #2663436: Character fields with a binary character set should be returned as str, else unicode. diff -r 6732437eb2ac -r 5db99d9be0fb MySQLdb/converters.py --- a/MySQLdb/converters.py Sat Feb 28 08:03:32 2009 +0000 +++ b/MySQLdb/converters.py Thu Mar 05 02:40:50 2009 +0000 @@ -180,7 +180,7 @@ def character_sql_to_python_plugin(cursor, field): if field.type not in character_types: return None - if field.flags & FLAG.BINARY: + if field.charsetnr == 63: return str charset = cursor.connection.character_set_name()