From 71b12a38f41f8420ffac54035030e9c342b2f6bc Mon Sep 17 00:00:00 2001 From: binaryatrocity Date: Mon, 17 Nov 2014 11:13:16 -0600 Subject: [PATCH] Use unicode encoding for Steam usernames --- app/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views.py b/app/views.py index 49d6bbb..a0baf7b 100644 --- a/app/views.py +++ b/app/views.py @@ -56,7 +56,7 @@ def create_or_login(resp): match = app.config['STEAM_ID_RE'].search(resp.identity_url) g.user = User.get_or_create(match.group(1)) steamdata = get_steam_userinfo(g.user.steam_id) - g.user.nickname = steamdata['personaname'] + g.user.nickname = steamdata['personaname'].encode('utf-8') g.user.avatar = steamdata['avatar'] db.session.commit() session['user_id'] = g.user.id