Mercurial > hg
changeset 588:49f132b434a3
"/room whois": correctly display utf8 resources
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sat, 10 Dec 2005 20:15:04 +0100 |
parents | 1b773c760a99 |
children | 9942746e8d58 |
files | mcabber/src/commands.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/commands.c Sat Dec 10 19:06:01 2005 +0100 +++ b/mcabber/src/commands.c Sat Dec 10 20:15:04 2005 +0100 @@ -1514,8 +1514,14 @@ scr_WriteIncomingMessage(jid, buffer, 0, HBB_PREFIX_INFO); if (realjid) { - snprintf(buffer, 127, "JID : <%s>", realjid); + gchar *rjid_noutf8 = from_utf8(realjid); + if (!rjid_noutf8) + scr_LogPrint(LPRINT_LOGNORM, "Decoding of real JID has failed: %s", + realjid); + snprintf(buffer, 127, "JID : <%s>", rjid_noutf8); scr_WriteIncomingMessage(jid, buffer, 0, HBB_PREFIX_INFO); + if (rjid_noutf8) + g_free(rjid_noutf8); } snprintf(buffer, 127, "Role : %s", strroles[role]);