-
Notifications
You must be signed in to change notification settings - Fork 680
Default to standards-compliant utf8mb4 character set #935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I think this default should depend on the server version: mysql < 5.5 cannot handle utf8mb4. |
|
@pasenor excellent point. |
|
Wait, how would that work? We set the charset before we make the connection. |
|
Oops, indeed, that's messy. But we should be able call set_charset() on the PyMySQL connection object inside our SQLExecute once know the version |
|
Note that
The |
|
@rolandwalker Is this PR still valid? Should this be merged? |
|
@amjith yes we should do something about it. Will review. |
02d03ef to
ecf6826
Compare
|
Reviving this old PR! The concern earlier was mostly that MySQL 5.5 didn't support the The PR has also been updated to add a |
* default to standards-compliant utf8mn4 character set * create a default_character_set key in ~/.myclirc which overrides any setting in ~/.my.cnf (previously the only way to set a default) * document how to connect to ancient versions of MySQL which lack this character set
ecf6826 to
592b84d
Compare
Description
xref #915
The
utf8character set in current MySQL versions is not actually standards-compliant. The standards-compliant UTF-8 character set is spelledutf8mb4, and that should be mycli's default.WIP because this should be researched/tested for MariaDB and Percona.Edit: tested on MariaDB. Researched for Percona: pages such as https://www.percona.com/blog/2018/04/10/migrating-database-charsets-to-utf8mb4/ have no suggestion of incompatibility.
Checklist
changelog.md.AUTHORSfile (or it's already there).