summaryrefslogtreecommitdiffstats
path: root/gconf
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-08-25 09:28:39 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-08-25 09:28:39 +0800
commit03470e3a7d7c5c610ce9e6c6ddc1607d33fe3280 (patch)
treeb1f1602358d93ad6f3f40983b6bdafca96e4bd69 /gconf
parentf25b1350150f0b2db51115362bbb4d3da3a8ef08 (diff)
downloadibus-03470e3a7d7c5c610ce9e6c6ddc1607d33fe3280.tar.gz
ibus-03470e3a7d7c5c610ce9e6c6ddc1607d33fe3280.tar.xz
ibus-03470e3a7d7c5c610ce9e6c6ddc1607d33fe3280.zip
Fix problem when font_name contains unicode chars.
Diffstat (limited to 'gconf')
-rw-r--r--gconf/config.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/gconf/config.py b/gconf/config.py
index 4b0a514..6b18e94 100644
--- a/gconf/config.py
+++ b/gconf/config.py
@@ -73,7 +73,7 @@ class Config(ibus.Object):
def __to_py_value(self, value):
if value.type == gconf.VALUE_STRING:
- return value.get_string()
+ return unicode(value.get_string(), "utf-8")
if value.type == gconf.VALUE_INT:
return value.get_int()
if value.type == gconf.VALUE_FLOAT:
@@ -89,7 +89,7 @@ class Config(ibus.Object):
def __to_gconf_value(self, value):
if isinstance(value, str) or isinstance(value, unicode):
ret = gconf.Value(gconf.VALUE_STRING)
- ret.set_string(value)
+ ret.set_string(value.encode("utf-8"))
elif isinstance(value, bool):
ret = gconf.Value(gconf.VALUE_BOOL)
ret.set_bool(value)