]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- add a test for #2771, fixes #2771
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 20 Mar 2015 18:56:31 +0000 (14:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 20 Mar 2015 19:08:23 +0000 (15:08 -0400)
- changelog for #2771

doc/build/changelog/changelog_10.rst
test/dialect/mysql/test_dialect.py

index 70f31f5e65f0346788be6c9f3ce0c14718429eb2..49a368b84cea75e30c9baac85272648792e41db6 100644 (file)
 .. changelog::
     :version: 1.0.0b2
 
+    .. change::
+        :tags: bug, mysql
+        :tickets: 2771
+        :pullreq: bitbucket:49
+
+        Fixes to fully support using the ``'utf8mb4'`` MySQL-specific charset
+        with MySQL dialects, in particular MySQL-Python and PyMySQL.   In
+        addition, MySQL databases that report more unusual charsets such as
+        'koi8u' or 'eucjpms' will also work correctly.  Pull request
+        courtesy Thomas Grainger.
+
     .. change::
         :tags: change, ext, declarative
         :tickets: 3331
index e6bad71a44332477a74530ec6a5a2dd8bfc67e81..9399af6481d9b1a676f71518149762b1d34c1460 100644 (file)
@@ -83,6 +83,14 @@ class DialectTest(fixtures.TestBase):
             )[1]
         eq_(kw['foo'], "true")
 
+    def test_special_encodings(self):
+
+        for enc in ['utf8mb4', 'utf8']:
+            eng = engines.testing_engine(
+                options={"connect_args": {'charset': enc, 'use_unicode': 0}})
+            conn = eng.connect()
+            eq_(conn.dialect._connection_charset, enc)
+
 class SQLModeDetectionTest(fixtures.TestBase):
     __only_on__ = 'mysql'
     __backend__ = True