# HG changeset patch # User Mark Doliner # Date 1154596625 0 # Node ID b87d84ab92f2f9d72f8122597960923ff739eb5c # Parent e1fd2a8bd40bfbbdfdfcbfb896d187e6729994ec [gaim-migrate @ 16626] Hopefully load non-ASCII aliases from our SSI information correctly more often with AIM/ICQ. Mattias Eriksson helped with this patch committer: Tailor Script diff -r e1fd2a8bd40b -r b87d84ab92f2 COPYRIGHT --- a/COPYRIGHT Thu Aug 03 07:57:52 2006 +0000 +++ b/COPYRIGHT Thu Aug 03 09:17:05 2006 +0000 @@ -86,6 +86,7 @@ Nelson Elhage Ignacio J. Elia Brian Enigma +Mattias Eriksson Stefan Esser Steffen Eschenbacher Marc Etcheverry diff -r e1fd2a8bd40b -r b87d84ab92f2 src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Thu Aug 03 07:57:52 2006 +0000 +++ b/src/protocols/oscar/oscar.c Thu Aug 03 09:17:05 2006 +0000 @@ -4786,7 +4786,18 @@ char *gname = aim_ssi_itemlist_findparentname(od->ssi.local, curitem->name); char *gname_utf8 = gname ? oscar_utf8_try_convert(gc->account, gname) : NULL; char *alias = aim_ssi_getalias(od->ssi.local, gname, curitem->name); - char *alias_utf8 = alias ? oscar_utf8_try_convert(gc->account, alias) : NULL; + char *alias_utf8; + + if (alias != NULL) + { + if (g_utf8_validate(alias, -1, NULL)) + alias_utf8 = g_strdup(alias); + else + alias_utf8 = oscar_utf8_try_convert(account, alias); + } + else + alias_utf8 = NULL; + b = gaim_find_buddy(gc->account, curitem->name); /* Should gname be freed here? -- elb */ /* Not with the current code, but that might be cleaner -- med */ @@ -4946,8 +4957,18 @@ gname = aim_ssi_itemlist_findparentname(od->ssi.local, name); gname_utf8 = gname ? oscar_utf8_try_convert(gc->account, gname) : NULL; + alias = aim_ssi_getalias(od->ssi.local, gname, name); - alias_utf8 = alias ? oscar_utf8_try_convert(gc->account, alias) : NULL; + if (alias != NULL) + { + if (g_utf8_validate(alias, -1, NULL)) + alias_utf8 = g_strdup(alias); + else + alias_utf8 = oscar_utf8_try_convert(gaim_connection_get_account(gc), alias); + } + else + alias_utf8 = NULL; + b = gaim_find_buddy(gc->account, name); g_free(alias);