im.pidgin.pidgin: 18c53c7dce829060f09481fa0ab784049bad1c5e
resiak at soc.pidgin.im
resiak at soc.pidgin.im
Mon Dec 10 10:25:42 EST 2007
-----------------------------------------------------------------
Revision: 18c53c7dce829060f09481fa0ab784049bad1c5e
Ancestor: 354c2c0310db2d6362ca0ca34da7d65e625ef5c0
Author: resiak at soc.pidgin.im
Date: 2007-12-10T15:22:27
Branch: im.pidgin.pidgin
Modified files:
libpurple/account.c
ChangeLog:
Ensure that an error's description actually is UTF-8 before writing it out to
accounts.xml. It might not be if a prpl uses strerror rather than g_strerror,
for example.
Fixes #4264.
-------------- next part --------------
============================================================
--- libpurple/account.c 1c5a1b5589a03433466d9c5cd31c7ba29ee9743e
+++ libpurple/account.c c974587f9df6546d4c33810388a5b10ccfd69f09
@@ -336,8 +336,13 @@ current_error_to_xmlnode(PurpleConnectio
xmlnode_insert_data(child, type_str, -1);
child = xmlnode_new_child(node, "description");
- if(err->description)
- xmlnode_insert_data(child, err->description, -1);
+ if(err->description) {
+ char *utf8ized = purple_utf8_try_convert(err->description);
+ if(utf8ized == NULL)
+ utf8ized = purple_utf8_salvage(err->description);
+ xmlnode_insert_data(child, utf8ized, -1);
+ g_free(utf8ized);
+ }
return node;
}
More information about the Commits
mailing list