--- a/libpurple/protocols/silc/ops.c Tue Dec 06 06:47:37 2011 +0000
+++ b/libpurple/protocols/silc/ops.c Tue Dec 06 06:50:18 2011 +0000
@@ -332,10 +332,17 @@
if (flags & SILC_MESSAGE_FLAG_UTF8) {
- tmp = g_markup_escape_text((const char *)message, -1);
+ const char *msg = (const char *)message; + if (!g_utf8_validate((const char *)message, -1, NULL)) { + salvaged = purple_utf8_salvage((const char *)message); + tmp = g_markup_escape_text(msg, -1); serv_got_chat_in(gc, purple_conv_chat_get_id(PURPLE_CONV_CHAT(convo)),
sender->nickname, 0, tmp, time(NULL));