utf8 fix to db connection
Change mysql connection type to use_unicode.
This commit is contained in:
parent
95add13731
commit
bdd615ede9
|
@ -59,7 +59,7 @@ class fpdb_db:
|
|||
self.database=database
|
||||
if backend==self.MYSQL_INNODB:
|
||||
import MySQLdb
|
||||
self.db=MySQLdb.connect(host = host, user = user, passwd = password, db = database)
|
||||
self.db=MySQLdb.connect(host = host, user = user, passwd = password, db = database, use_unicode=True)
|
||||
elif backend==self.PGSQL:
|
||||
import psycopg2
|
||||
# If DB connection is made over TCP, then the variables
|
||||
|
|
Loading…
Reference in New Issue
Block a user