From: Huang Peng Date: Mon, 25 Aug 2008 01:28:39 +0000 (+0800) Subject: Fix problem when font_name contains unicode chars. X-Git-Tag: 0.1.1.20080830~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03470e3a7d7c5c610ce9e6c6ddc1607d33fe3280;p=platform%2Fupstream%2Fibus.git Fix problem when font_name contains unicode chars. --- diff --git a/gconf/config.py b/gconf/config.py index 4b0a5147..6b18e945 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)