changeset 59:5db99d9be0fb MySQLdb

Fix #2663436: Character fields with a binary character set should be returned as str, else unicode.
author adustman
date Thu, 05 Mar 2009 02:40:50 +0000
parents 6732437eb2ac
children c9fd1a7932f4
files MySQLdb/converters.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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()