[chronojump-server] Fixing encoding problems in task description
- From: Marcos Venteo Garcia <mventeo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump-server] Fixing encoding problems in task description
- Date: Sun, 28 May 2017 19:48:11 +0000 (UTC)
commit daa5343bbb38ed7048a919e764d6687d68ee8ffd
Author: Marcos Venteo <mventeo gmail com>
Date: Sun May 28 21:47:54 2017 +0200
Fixing encoding problems in task description
chronojump-flask/chronojump_server.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/chronojump-flask/chronojump_server.py b/chronojump-flask/chronojump_server.py
index d070585..766ac3a 100644
--- a/chronojump-flask/chronojump_server.py
+++ b/chronojump-flask/chronojump_server.py
@@ -261,10 +261,10 @@ class TaskList(Resource):
sql = "insert into task values(NULL,"
sql += "'" + dt.strftime('%y-%m-%d %H:%M:%S') + "',"
sql += str(player_id) + ","
- sql += "'" + description + "', 0)"
+ sql += "'" + description.encode('utf-8')+ "', 0)"
else:
sql = "update task set "
- sql += "comment='" + description + "' "
+ sql += "comment='" + description.encode('utf-8') + "' "
sql += "where id="+task_id
print sql
db = mysql.connect()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]