From 8f9c0152b1722dde4b5c6230328f971f9c436a05 Mon Sep 17 00:00:00 2001 From: Jan Behrens Date: Tue, 16 Apr 2013 23:25:29 +0200 Subject: [PATCH] Resolve some issues with characters not being translated correctly, fixes #1097 --- xonstat/models.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xonstat/models.py b/xonstat/models.py index eb0a131..91901d6 100644 --- a/xonstat/models.py +++ b/xonstat/models.py @@ -10,7 +10,7 @@ from sqlalchemy.orm import mapper from sqlalchemy.orm import scoped_session from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base -from xonstat.util import strip_colors, html_colors, pretty_date +from xonstat.util import qfont_decode, strip_colors, html_colors, pretty_date log = logging.getLogger(__name__) @@ -41,7 +41,7 @@ class Player(object): return {'player_id':self.player_id, 'nick':self.nick, 'joined':self.create_dt.strftime('%Y-%m-%dT%H:%M:%SZ'), 'active_ind':self.active_ind, 'location':self.location, - 'stripped_nick':self.stripped_nick} + 'stripped_nick':qfont_decode(self.stripped_nick)} def epoch(self): return timegm(self.create_dt.timetuple()) @@ -206,10 +206,10 @@ class Hashkey(object): class PlayerNick(object): def __repr__(self): - return "" % (self.player_id, self.stripped_nick) + return "" % (self.player_id, qfont_decode(self.stripped_nick)) def to_dict(self): - return {'player_id':self.player_id, 'name':self.stripped_nick} + return {'player_id':self.player_id, 'name':qfont_decode(self.stripped_nick)} class PlayerElo(object): -- 2.39.2