self.logger.info('logging in to %s:%s as %s'
% (host, database, username))
self.db = MySQLdb.connect(host=host, user=username,
- passwd=password, db=database)
+ passwd=password, db=database,
+ charset='UTF8')
del(username)
del(password)
self.cursor = self.db.cursor()
def execute(self, command):
self.logger.info(command)
- self.cursor.execute(command)
+ self.cursor.execute(command.encode('utf-8'))
def set_default_table(self, table):
self.table = table
first_middle=prof['firstname'],
last=prof['lastname'],
)
- if p.name.last.encode('hex') == '56616c6c69e8726573':
- p.name.last = u'Valli\xe8res'
p.title = prof['position']
if prof['position1'] != None:
p.title += ', %s' % prof['position1']