From b8a2096f3e99527da8b7e89ee047ef3364122f70 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Fri, 3 Feb 2012 15:26:24 +0530 Subject: [PATCH] Use unicode while connecting to db --- py/webnotes/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/py/webnotes/db.py b/py/webnotes/db.py index adcd3ca09d..4b070da8e9 100644 --- a/py/webnotes/db.py +++ b/py/webnotes/db.py @@ -65,7 +65,7 @@ class Database: """ Connect to a database """ - self._conn = MySQLdb.connect(user=self.user, host=self.host, passwd=self.password) + self._conn = MySQLdb.connect(user=self.user, host=self.host, passwd=self.password, use_unicode=True) self._conn.set_character_set('utf8') self._cursor = self._conn.cursor()