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:
parent
5e66e48b75
commit
2c9982cfff
|
@ -64,7 +64,7 @@ class fpdb_db:
|
||||||
if backend==fpdb_db.MYSQL_INNODB:
|
if backend==fpdb_db.MYSQL_INNODB:
|
||||||
import MySQLdb
|
import MySQLdb
|
||||||
try:
|
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:
|
except:
|
||||||
raise fpdb_simple.FpdbError("MySQL connection failed")
|
raise fpdb_simple.FpdbError("MySQL connection failed")
|
||||||
elif backend==fpdb_db.PGSQL:
|
elif backend==fpdb_db.PGSQL:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user