failed attempt at making SQLite accept non-ASCII player names for this

This commit is contained in:
steffen123 2010-07-11 00:37:32 +02:00
parent 604e242349
commit 6a3587e92e

View File

@ -822,9 +822,10 @@ class Database:
def get_player_id(self, config, siteName, playerName): def get_player_id(self, config, siteName, playerName):
c = self.connection.cursor() c = self.connection.cursor()
siteNameUtf = Charset.to_utf8(siteName)
playerNameUtf = Charset.to_utf8(playerName) playerNameUtf = Charset.to_utf8(playerName)
#print "db.get_player_id siteName",siteName,"playerName",playerName #print "db.get_player_id siteName",siteName,"playerName",playerName
c.execute(self.sql.query['get_player_id'], (playerNameUtf, siteName)) c.execute(self.sql.query['get_player_id'], (playerNameUtf, siteNameUtf))
row = c.fetchone() row = c.fetchone()
if row: if row:
return row[0] return row[0]