]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Refinement for r2890, column names should remain unicode.
authorJason Kirtland <jek@discorporate.us>
Fri, 13 Jul 2007 19:03:02 +0000 (19:03 +0000)
committerJason Kirtland <jek@discorporate.us>
Fri, 13 Jul 2007 19:03:02 +0000 (19:03 +0000)
lib/sqlalchemy/databases/mysql.py

index 92f7cf0a7575f7b0833e8643e6fc87ee4b6ad0ca..5806bee2ecc4e6561fc27ed4df26379606047534 100644 (file)
@@ -1092,6 +1092,9 @@ class MySQLDialect(ansisql.ANSIDialect):
             (name, type, nullable, primary_key, default) = \
                    (row[0], row[1], row[2] == 'YES', row[3] == 'PRI', row[4])
 
+            # leave column names as unicode
+            name = name.decode(decode_from)
+
             match = re.match(r'(\w+)(\(.*?\))?\s*(\w+)?\s*(\w+)?', type)
             col_type = match.group(1)
             args = match.group(2)