From a7b3eae9c9a89540f268a54f3e745537ca4feb65 Mon Sep 17 00:00:00 2001 From: Michael Ziegler Date: Tue, 23 Feb 2010 20:49:43 +0100 Subject: [PATCH] when fetching player data, decode strings from UTF8. --- pyweb/mumble/MumbleCtlIce.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pyweb/mumble/MumbleCtlIce.py b/pyweb/mumble/MumbleCtlIce.py index 2e4188c..15c0f3b 100644 --- a/pyweb/mumble/MumbleCtlIce.py +++ b/pyweb/mumble/MumbleCtlIce.py @@ -396,7 +396,11 @@ class MumbleCtlIce_120(MumbleCtlIce_118): @protectDjangoErrPage def getPlayers(self, srvid): - return self._getIceServerObject(srvid).getUsers(); + userdata = self._getIceServerObject(srvid).getUsers(); + for key in userdata: + if isinstance( userdata[key], str ): + userdata[key] = userdata[key].decode( "UTF-8" ) + return userdata @protectDjangoErrPage def registerPlayer(self, srvid, name, email, password):