Mercurial > pidgin
diff plugins/jabber/jabber.c @ 2039:859e9c2c5813
[gaim-migrate @ 2049]
utf8
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sat, 16 Jun 2001 19:16:25 +0000 |
parents | cfb9cf4655e6 |
children | 711d0115bf1e |
line wrap: on
line diff
--- a/plugins/jabber/jabber.c Sat Jun 16 17:55:57 2001 +0000 +++ b/plugins/jabber/jabber.c Sat Jun 16 19:16:25 2001 +0000 @@ -1236,8 +1236,10 @@ xmlnode_put_attrib(x, "type", "chat"); if (message && strlen(message)) { + char *utf8 = str_to_utf8(message); y = xmlnode_insert_tag(x, "body"); - xmlnode_insert_cdata(y, message, -1); + xmlnode_insert_cdata(y, utf8, -1); + g_free(utf8); } gjab_send(((struct jabber_data *)gc->proto_data)->jc, x); @@ -1397,8 +1399,10 @@ g_free(subject); if (message && strlen(message)) { + char *utf8 = str_to_utf8(message); y = xmlnode_insert_tag(x, "body"); - xmlnode_insert_cdata(y, message, -1); + xmlnode_insert_cdata(y, utf8, -1); + g_free(utf8); } gjab_send(((struct jabber_data *)gc->proto_data)->jc, x); @@ -1479,8 +1483,10 @@ xmlnode_put_attrib(x, "type", "groupchat"); if (message && strlen(message)) { + char *utf8 = str_to_utf8(message); y = xmlnode_insert_tag(x, "body"); - xmlnode_insert_cdata(y, message, -1); + xmlnode_insert_cdata(y, utf8, -1); + g_free(utf8); } gjab_send(((struct jabber_data *)gc->proto_data)->jc, x); @@ -1524,11 +1530,13 @@ xmlnode_put_attrib(x, "type", "groupchat"); if (topic && strlen(topic)) { + char *utf8 = str_to_utf8(topic); y = xmlnode_insert_tag(x, "subject"); - xmlnode_insert_cdata(y, topic, -1); + xmlnode_insert_cdata(y, utf8, -1); y = xmlnode_insert_tag(x, "body"); - g_snprintf(buf, sizeof(buf), "/me has changed the subject to: %s", topic); + g_snprintf(buf, sizeof(buf), "/me has changed the subject to: %s", utf8); xmlnode_insert_cdata(y, buf, -1); + g_free(utf8); } gjab_send(((struct jabber_data *)gc->proto_data)->jc, x); @@ -1571,8 +1579,10 @@ xmlnode_put_attrib(x, "type", "normal"); if (message && strlen(message)) { + char *utf8 = str_to_utf8(message); y = xmlnode_insert_tag(x, "body"); - xmlnode_insert_cdata(y, message, -1); + xmlnode_insert_cdata(y, utf8, -1); + g_free(utf8); } gjab_send(((struct jabber_data *)gc->proto_data)->jc, x);