src/protocols/irc/parse.c

changeset 10504
eae130eefbfe
parent 10278
8b2f32c72daf
child 10564
1ee5ae99711d
equal deleted inserted replaced
10503:6f6f0b990441 10504:eae130eefbfe
233 int i; 233 int i;
234 234
235 enclist = gaim_account_get_string(irc->account, "encoding", IRC_DEFAULT_CHARSET); 235 enclist = gaim_account_get_string(irc->account, "encoding", IRC_DEFAULT_CHARSET);
236 encodings = g_strsplit(enclist, ",", -1); 236 encodings = g_strsplit(enclist, ",", -1);
237 237
238 if (encodings[0] == NULL) 238 if (encodings[0] == NULL) {
239 g_strfreev(encodings);
239 return gaim_utf8_salvage(string); 240 return gaim_utf8_salvage(string);
241 }
240 242
241 for (i = 0; encodings[i] != NULL; i++) { 243 for (i = 0; encodings[i] != NULL; i++) {
242 charset = encodings[i]; 244 charset = encodings[i];
243 while (*charset == ' ') 245 while (*charset == ' ')
244 charset++; 246 charset++;
253 if (utf8) { 255 if (utf8) {
254 g_strfreev(encodings); 256 g_strfreev(encodings);
255 return utf8; 257 return utf8;
256 } 258 }
257 } 259 }
260 g_strfreev(encodings);
258 261
259 return gaim_utf8_salvage(string); 262 return gaim_utf8_salvage(string);
260 } 263 }
261 264
262 /* XXX tag closings are not necessarily correctly nested here! If we 265 /* XXX tag closings are not necessarily correctly nested here! If we

mercurial