From 27e5bf86988177b3403ad23d52b3bf52bf688104 Mon Sep 17 00:00:00 2001 From: Gerko de Roo Date: Mon, 17 May 2010 19:23:17 +0200 Subject: [PATCH] Moved Codec conversion to Charset The TIP is using a codec conversion that doesn't handle error exeptions. This could lock up the HUD.... --- pyfpdb/Stats.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyfpdb/Stats.py b/pyfpdb/Stats.py index 264ebd18..74d51675 100755 --- a/pyfpdb/Stats.py +++ b/pyfpdb/Stats.py @@ -57,6 +57,7 @@ import re # FreePokerTools modules import Configuration import Database +import Charset re_Places = re.compile("_[0-9]$") @@ -67,7 +68,7 @@ import codecs encoder = codecs.lookup(Configuration.LOCALE_ENCODING) def do_tip(widget, tip): - (_tip, _len) = encoder.encode(tip) + _tip = Charset.to_utf8(tip) widget.set_tooltip_text(_tip) def do_stat(stat_dict, player = 24, stat = 'vpip'):