utf8 fix to db connection

Change mysql connection type to use_unicode.
This commit is contained in:
Worros 2009-03-28 20:32:30 +09:00
parent 2e687acf9a
commit 5139b88538

View File

@ -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