Mercurial > pidgin
comparison src/protocols/irc/parse.c @ 10278:dabcadc17ca0
[gaim-migrate @ 11433]
And a little leak in irc conversion
committer: Tailor Script <tailor@pidgin.im>
| author | Ethan Blanton <elb@pidgin.im> |
|---|---|
| date | Mon, 29 Nov 2004 04:34:04 +0000 |
| parents | 357d4fa1bfbe |
| children | 1a97d5e88d12 |
comparison
equal
deleted
inserted
replaced
| 10277:c9872abd9518 | 10278:dabcadc17ca0 |
|---|---|
| 206 const gchar *enclist; | 206 const gchar *enclist; |
| 207 | 207 |
| 208 enclist = gaim_account_get_string(irc->account, "encoding", IRC_DEFAULT_CHARSET); | 208 enclist = gaim_account_get_string(irc->account, "encoding", IRC_DEFAULT_CHARSET); |
| 209 encodings = g_strsplit(enclist, ",", 2); | 209 encodings = g_strsplit(enclist, ",", 2); |
| 210 | 210 |
| 211 if (encodings[0] == NULL || !strcasecmp("UTF-8", encodings[0])) | 211 if (encodings[0] == NULL || !strcasecmp("UTF-8", encodings[0])) { |
| 212 g_strfreev(encodings); | |
| 212 return g_strdup(string); | 213 return g_strdup(string); |
| 214 } | |
| 213 | 215 |
| 214 utf8 = g_convert(string, strlen(string), encodings[0], "UTF-8", NULL, NULL, &err); | 216 utf8 = g_convert(string, strlen(string), encodings[0], "UTF-8", NULL, NULL, &err); |
| 215 if (err) { | 217 if (err) { |
| 216 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Send conversion error: %s\n", err->message); | 218 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Send conversion error: %s\n", err->message); |
| 217 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Sending as UTF-8 instead of %s\n", encodings[0]); | 219 gaim_debug(GAIM_DEBUG_ERROR, "irc", "Sending as UTF-8 instead of %s\n", encodings[0]); |
