[chronojump-server] Uses UTF-8 connection to Mysql. Then the names are read correctly.



commit e68a6b1ac9d45d9ca6a64b5247208dcb04e43421
Author: Carles Pina i Estany <carles pina cat>
Date:   Mon Jun 26 23:55:16 2017 -0400

    Uses UTF-8 connection to Mysql. Then the names are read correctly.
    
    Tested on Debian Jessie only where the default configuration is that
    Mysql uses UTF-8.

 main.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/main.py b/main.py
index 9f99b75..1767dca 100755
--- a/main.py
+++ b/main.py
@@ -47,7 +47,8 @@ def connect_db(cursorclass=MySQLdb.cursors.Cursor):
         user=config.get("db","user"),
         passwd=config.get("db","password"),
         db=config.get("db","name"),
-        cursorclass=cursorclass
+        cursorclass=cursorclass,
+        charset='utf8'
         )
 
     cur = db.cursor()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]