diff options
author | Thomas Grainger <tagrain@gmail.com> | 2015-03-17 15:43:27 +0000 |
---|---|---|
committer | Thomas Grainger <tagrain@gmail.com> | 2015-03-17 15:43:27 +0000 |
commit | 88f8ad046d623400e89f00dd2608e8deff151dee (patch) | |
tree | cf402eab5f622f8405e2924805c1e15d8ba0f5bf | |
parent | 2cadd768aa48d1180e24600cf133586a343ea10b (diff) | |
download | sqlalchemy-pr/161.tar.gz |
To support unicode with mysql you need to use utf8mb4pr/161
-rw-r--r-- | lib/sqlalchemy/dialects/mysql/mysqldb.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/dialects/mysql/mysqldb.py b/lib/sqlalchemy/dialects/mysql/mysqldb.py index 0d125a245..560e9af89 100644 --- a/lib/sqlalchemy/dialects/mysql/mysqldb.py +++ b/lib/sqlalchemy/dialects/mysql/mysqldb.py @@ -26,7 +26,7 @@ is orders of magnitude faster than that of MySQLdb as it does not call into Python functions to do so. Therefore, the **recommended URL to use for unicode** will include both charset and use_unicode=0:: - create_engine("mysql+mysqldb://user:pass@host/dbname?charset=utf8&use_unicode=0") + create_engine("mysql+mysqldb://user:pass@host/dbname?charset=utf8mb4&use_unicode=0") As of this writing, MySQLdb only runs on Python 2. It is not known how MySQLdb behaves on Python 3 as far as unicode decoding. |