From 58ce4d53bf5e2f2d6fa28720dc9e3a130c77f7e3 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 20 Mar 2015 14:56:31 -0400 Subject: [PATCH] - add a test for #2771, fixes #2771 - changelog for #2771 --- doc/build/changelog/changelog_10.rst | 11 +++++++++++ test/dialect/mysql/test_dialect.py | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/doc/build/changelog/changelog_10.rst b/doc/build/changelog/changelog_10.rst index 70f31f5e65..49a368b84c 100644 --- a/doc/build/changelog/changelog_10.rst +++ b/doc/build/changelog/changelog_10.rst @@ -18,6 +18,17 @@ .. 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 diff --git a/test/dialect/mysql/test_dialect.py b/test/dialect/mysql/test_dialect.py index e6bad71a44..9399af6481 100644 --- a/test/dialect/mysql/test_dialect.py +++ b/test/dialect/mysql/test_dialect.py @@ -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 -- 2.47.3