Make sure the db connection is encoded using utf8

This has an issue with my current code, but may cause other issues.

Keeping to a 1 line change incase we need to revert at some point in future.
This commit is contained in:
Worros 2009-08-04 18:30:39 +08:00
parent 5e66e48b75
commit 2c9982cfff

View File

@ -64,7 +64,7 @@ class fpdb_db:
if backend==fpdb_db.MYSQL_INNODB:
import MySQLdb
try:
self.db = MySQLdb.connect(host = host, user = user, passwd = password, db = database, use_unicode=True)
self.db = MySQLdb.connect(host = host, user = user, passwd = password, db = database, use_unicode=True, charset="utf8")
except:
raise fpdb_simple.FpdbError("MySQL connection failed")
elif backend==fpdb_db.PGSQL: