Mercurial > hg
changeset 1064:516b5f7d1023
Fix some UTF-8 related problems
When the jid is invalid, it is displayed in the error messages.
However, in non-UTF-8 locales the LPRINT_NOTUTF8 must be provided
because we call scr_LogPrint() before the UTF-8 conversion.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 01 Dec 2006 23:50:52 +0100 |
parents | 4e62941df777 |
children | 230dca34dbea |
files | mcabber/src/commands.c |
diffstat | 1 files changed, 12 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/commands.c Fri Dec 01 20:16:18 2006 +0100 +++ b/mcabber/src/commands.c Fri Dec 01 23:50:52 2006 +0100 @@ -443,7 +443,8 @@ if (bjid) { // The JID has been specified. Quick check... if (check_jid_syntax(bjid)) { - scr_LogPrint(LPRINT_NORMAL, "<%s> is not a valid Jabber ID.", bjid); + scr_LogPrint(LPRINT_NORMAL|LPRINT_NOTUTF8, + "<%s> is not a valid Jabber ID.", bjid); } else { // Find the buddy GSList *roster_elt; @@ -746,7 +747,8 @@ if (fjid) { // The JID has been specified. Quick check... if (check_jid_syntax(fjid)) { - scr_LogPrint(LPRINT_NORMAL, "<%s> is not a valid Jabber ID.", fjid); + scr_LogPrint(LPRINT_NORMAL|LPRINT_NOTUTF8, + "<%s> is not a valid Jabber ID.", fjid); fjid = NULL; } else { // Convert jid to lowercase @@ -801,7 +803,8 @@ if (id) { // The JID has been specified. Quick check... if (check_jid_syntax(id)) { - scr_LogPrint(LPRINT_NORMAL, "<%s> is not a valid Jabber ID.", id); + scr_LogPrint(LPRINT_NORMAL|LPRINT_NOTUTF8, + "<%s> is not a valid Jabber ID.", id); id = NULL; } else { mc_strtolower(id); @@ -920,7 +923,8 @@ return 1; } if (check_jid_syntax((char*)fjid)) { - scr_LogPrint(LPRINT_NORMAL, "<%s> is not a valid Jabber ID.", fjid); + scr_LogPrint(LPRINT_NORMAL|LPRINT_NOTUTF8, + "<%s> is not a valid Jabber ID.", fjid); return 1; } @@ -2323,7 +2327,8 @@ arg = NULL; } else { if (check_jid_syntax(arg)) { - scr_LogPrint(LPRINT_NORMAL, "<%s> is not a valid Jabber ID.", arg); + scr_LogPrint(LPRINT_NORMAL|LPRINT_NOTUTF8, + "<%s> is not a valid Jabber ID.", arg); free_arg_lst(paramlst); return; } @@ -2428,7 +2433,8 @@ if (fjid) { // The JID has been specified. Quick check... if (check_jid_syntax(fjid)) { - scr_LogPrint(LPRINT_NORMAL, "<%s> is not a valid Jabber ID.", fjid); + scr_LogPrint(LPRINT_NORMAL|LPRINT_NOTUTF8, + "<%s> is not a valid Jabber ID.", fjid); fjid = NULL; } else { // Convert jid to lowercase