]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
add utf8mb4 recommendation
authorThomas Grainger <tom@yplanapp.com>
Wed, 18 Mar 2015 11:40:03 +0000 (11:40 +0000)
committerThomas Grainger <tom@yplanapp.com>
Wed, 18 Mar 2015 11:47:17 +0000 (11:47 +0000)
lib/sqlalchemy/dialects/mysql/mysqldb.py

index 0d125a24515aff969d29cffbda4a1a476967eac5..a65f69622cb606df2b8353bf68e075d05f88bcce 100644 (file)
@@ -28,6 +28,18 @@ unicode** will include both charset and use_unicode=0::
 
     create_engine("mysql+mysqldb://user:pass@host/dbname?charset=utf8&use_unicode=0")
 
+For MySQL versions 5.5.3 and MySQLdb version 1.2.3 forward, the special
+MySQL-specific encoding 'utf8mb4' is now recommended::
+
+    create_engine("mysql+mysqldb://user:pass@host/dbname?charset=utf8mb4&use_unicode=0")
+
+The 'utf8' encoding may still be used, however MySQL will only support
+unicode characters within the first three of four possible bytes:
+no (&#128169; or &#128571;) note that in order to use utf8mb4 fully, changes to
+the MySQL schema and/or server configuration may be required.
+See also: `The utf8mb4 character set
+<http://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html>_`.
+
 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.