Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Schampijer <simon@schampijer.de>2010-10-19 13:30:40 (GMT)
committer Simon Schampijer <simon@schampijer.de>2010-10-19 13:30:40 (GMT)
commit37a156bef2c68438097a9082c148a0d786799fbe (patch)
tree7f5b83209f00fadc3e18e532b837fc681396029a
parent786174697c7afbd45c91e0ce32373e11c6f95818 (diff)
Deal with unicode nick names #889
(Moved that patch in the repository from the F11 rpm)
-rw-r--r--src/buddy.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/buddy.py b/src/buddy.py
index 68061c6..43271f7 100644
--- a/src/buddy.py
+++ b/src/buddy.py
@@ -955,8 +955,12 @@ class ShellOwner(GenericOwner):
key_hash = profile.privkey_hash
key = profile.pubkey
- nick = client.get_string("/desktop/sugar/user/nick")
color = client.get_string("/desktop/sugar/user/color")
+ nick = client.get_string("/desktop/sugar/user/nick")
+ if not isinstance(nick, unicode):
+ # GConf let you only store utf-8 encoded strings, why we can
+ # expect an utf-8 string here
+ nick = unicode(nick, 'utf-8')
icon_file = os.path.join(env.get_profile_path(), "buddy-icon.jpg")
f = open(icon_file, "r")