Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: sitescripts/reports/utils.py

Issue 29952558: #17868 - Use actual utf8 with mysql
Patch Set: Created Nov. 27, 2018, 7:12 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sitescripts/reports/schema.sql ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sitescripts/reports/utils.py
===================================================================
--- a/sitescripts/reports/utils.py
+++ b/sitescripts/reports/utils.py
@@ -278,4 +278,7 @@
def executeQuery(cursor, query, args=None):
tablePrefix = get_config().get('reports', 'dbprefix')
query = re.sub(r'#PFX#', tablePrefix, query)
+ cursor.execute('SET NAMES utf8mb4')
+ cursor.execute('SET CHARACTER SET utf8mb4')
+ cursor.execute('SET character_set_connection=utf8mb4')
cursor.execute(query, args)
« no previous file with comments | « sitescripts/reports/schema.sql ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld