Mercurial > pidgin
diff src/protocols/jabber/jabber.c @ 3642:5e50f6746509
[gaim-migrate @ 3766]
(10:16:03) deryni: we're fully 'compliant'? (sorry if that betrays some underlying stupidity)
(10:16:55) Paco-Paco: yes
(10:17:24) Paco-Paco: provided the user has the font, on any of the services supporting unicode we should support every known language in the world :-)
(10:17:36) Paco-Paco: well, as soon as we have a proper utf-8 input widget
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Fri, 11 Oct 2002 14:19:24 +0000 |
parents | 9682c0e022c6 |
children | 1a6d3f3bc682 |
line wrap: on
line diff
--- a/src/protocols/jabber/jabber.c Fri Oct 11 12:24:25 2002 +0000 +++ b/src/protocols/jabber/jabber.c Fri Oct 11 14:19:24 2002 +0000 @@ -1305,8 +1305,6 @@ msg = xmlnode_get_data(y); } - msg = utf8_to_str(msg); - if (!from) return; @@ -1362,9 +1360,6 @@ g_free(from); } - if (msg) - g_free(msg); - } else if (!strcasecmp(type, "error")) { if ((y = xmlnode_get_tag(p->x, "error"))) { type = xmlnode_get_attrib(y, "code"); @@ -1389,12 +1384,9 @@ msg = xmlnode_get_data(y); } - msg = utf8_to_str(msg); - if ((subj = xmlnode_get_tag(p->x, "subject"))) { topic = xmlnode_get_data(subj); } - topic = utf8_to_str(topic); jc = find_existing_chat(GJ_GC(gjc), p->from); if (!jc) { @@ -1438,9 +1430,6 @@ } } - g_free(msg); - g_free(topic); - } else { debug_printf("unhandled message %s\n", type); } @@ -1764,9 +1753,6 @@ /* * Add or remove a buddy? Change buddy's alias or group? */ - if(name) - name = utf8_to_str(name); - if (BUD_SUB_TO_PEND(sub, ask) || BUD_SUBD_TO(sub, ask)) { if ((b = find_buddy(GJ_GC(gjc), buddyname)) == NULL) { debug_printf("adding buddy [4]: %s\n", buddyname); @@ -1806,9 +1792,6 @@ jabber_remove_gaim_buddy(GJ_GC(gjc), buddyname); } - if(name) - g_free(name); - g_free(buddyname); } @@ -2478,10 +2461,8 @@ xmlnode_insert_tag(y, "composing"); if (message && strlen(message)) { - char *utf8 = str_to_utf8((char*)message); y = xmlnode_insert_tag(x, "body"); - xmlnode_insert_cdata(y, utf8, -1); - g_free(utf8); + xmlnode_insert_cdata(y, message, -1); } gjab_send(((struct jabber_data *)gc->proto_data)->gjc, x); @@ -2539,9 +2520,7 @@ */ if(my_alias != NULL && my_alias[0] != '\0' && strcmp(realwho, my_alias)) { - char *utf8 = str_to_utf8(my_alias); - xmlnode_put_attrib(y, "name", utf8); - g_free(utf8); + xmlnode_put_attrib(y, "name", my_alias); } /* @@ -2965,10 +2944,8 @@ g_free(subject); if (message && strlen(message)) { - char *utf8 = str_to_utf8((char*)message); y = xmlnode_insert_tag(x, "body"); - xmlnode_insert_cdata(y, utf8, -1); - g_free(utf8); + xmlnode_insert_cdata(y, message, -1); } gjab_send(((struct jabber_data *)gc->proto_data)->gjc, x); @@ -3017,18 +2994,14 @@ if (message && strlen(message) > strlen("/topic ") && !g_strncasecmp(message, "/topic ", strlen("/topic "))) { char buf[8192]; - char *utf8 = str_to_utf8(message + strlen("/topic ")); y = xmlnode_insert_tag(x, "subject"); - xmlnode_insert_cdata(y, utf8, -1); + xmlnode_insert_cdata(y, message + strlen("/topic "), -1); y = xmlnode_insert_tag(x, "body"); - g_snprintf(buf, sizeof(buf), "/me has changed the subject to: %s", utf8); + g_snprintf(buf, sizeof(buf), "/me has changed the subject to: %s", message + strlen("/topic")); xmlnode_insert_cdata(y, buf, -1); - g_free(utf8); } else if (message && strlen(message)) { - char *utf8 = str_to_utf8(message); y = xmlnode_insert_tag(x, "body"); - xmlnode_insert_cdata(y, utf8, -1); - g_free(utf8); + xmlnode_insert_cdata(y, message, -1); } gjab_send(((struct jabber_data *)gc->proto_data)->gjc, x); @@ -3054,10 +3027,8 @@ 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, utf8, -1); - g_free(utf8); + xmlnode_insert_cdata(y, message, -1); } gjab_send(((struct jabber_data *)gc->proto_data)->gjc, x);