Storycraft: attempt at handling unicode properly
This commit is contained in:
parent
56bd5a687b
commit
cdb7a58240
@ -1024,7 +1024,7 @@ class Storycraft(Module):
|
||||
line.id = result['id']
|
||||
line.game_id = result['game_id']
|
||||
line.player_id = result['player_id']
|
||||
line.line = result['line']
|
||||
line.line = result['line'].encode('utf-8', 'replace')
|
||||
line.time = result['time']
|
||||
|
||||
lines.append(line)
|
||||
@ -1043,7 +1043,7 @@ class Storycraft(Module):
|
||||
statement = '''
|
||||
UPDATE storycraft_line SET line = ?, time = CURRENT_TIMESTAMP WHERE id = ?
|
||||
'''
|
||||
cur.execute(statement, (input_line, line_id))
|
||||
cur.execute(statement, (input_line.decode('utf-8', 'replace'), line_id))
|
||||
db.commit()
|
||||
return line_id
|
||||
except sqlite3.Error as e:
|
||||
|
Loading…
Reference in New Issue
Block a user