changeset 8588:210e76d69b62

mysql: bump charset to to 'utf8mb4' to get full UTF-8 support We used to use 'utf8', but in MySQL, this is just an alias for 'utf8mb3' which isn't full unicode. 'utf8mb4' has less surprises (especially if used with the 'utf8mb4_unicode_ci' collation). MySQL character sets for server, database, tables, and connection are set independently. Until now, we have specified 'utf8' when creating tables to overrule the database charset and in the default MySQL connection URL. For existing databases, it is recommended to change encoding (and collation) by altering the each of the tables inside it as described on https://stackoverflow.com/questions/6115612/how-to-convert-an-entire-mysql-database-characterset-and-collation-to-utf-8 .
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 15 Jun 2020 16:57:20 +0200
parents 1e0cd9f75fbc
children 7b0aafc6b7ca
files kallithea/model/db.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/model/db.py	Wed Jun 24 23:58:53 2020 +0200
+++ b/kallithea/model/db.py	Mon Jun 15 16:57:20 2020 +0200
@@ -167,7 +167,7 @@
 
 _table_args_default_dict = {'extend_existing': True,
                             'mysql_engine': 'InnoDB',
-                            'mysql_charset': 'utf8',
+                            'mysql_charset': 'utf8mb4',
                             'sqlite_autoincrement': True,
                            }