# HG changeset patch # User Mikael Berthe # Date 1165013452 -3600 # Node ID 516b5f7d1023a32d8d9555f14e1ab42e91c002d6 # Parent 4e62941df7779099b0e6093b4376f28214b418f1 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. diff -r 4e62941df777 -r 516b5f7d1023 mcabber/src/commands.c --- 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