# HG changeset patch # User Elliott Sales de Andrade # Date 1327730748 0 # Node ID cd51eccbe602b0be03bbbd82c76bb403bac765be # Parent e456bcd69588148a76e53e9a520fa38e74b97a32 Add newlines to debug messages, and word-wrap lines. diff -r e456bcd69588 -r cd51eccbe602 libpurple/protocols/msn/oim.c --- a/libpurple/protocols/msn/oim.c Thu Jan 26 03:00:33 2012 +0000 +++ b/libpurple/protocols/msn/oim.c Sat Jan 28 06:05:48 2012 +0000 @@ -660,16 +660,17 @@ charset = msn_message_get_charset(message); } - if (charset && !((strncasecmp(charset, "UTF-8", 5) == 0) || (strncasecmp(charset, "UTF8", 4) == 0))) { clean_msg = g_convert(decode_msg, strlen(decode_msg), "UTF-8", charset, NULL, NULL, NULL); if (!clean_msg) { char *clean = purple_utf8_salvage(decode_msg); - purple_debug_error("msn", "Failed to convert charset from %s to UTF-8 for OIM message: %s", charset, clean); + purple_debug_error("msn", "Failed to convert charset from %s to UTF-8 for OIM message: %s\n", charset, clean); - clean_msg = g_strdup_printf(_("%s (There was an error receiving this message. Converting the encoding from %s to UTF-8 failed.)"), clean, charset); + clean_msg = g_strdup_printf(_("%s (There was an error receiving this message. " + "Converting the encoding from %s to UTF-8 failed.)"), + clean, charset); g_free(clean); } @@ -679,12 +680,17 @@ if (!g_utf8_validate(decode_msg, -1, NULL)) { char *clean = purple_utf8_salvage(decode_msg); - purple_debug_error("msn", "Received an OIM message that is not UTF-8, and no encoding specified: %s", clean); + purple_debug_error("msn", "Received an OIM message that is not UTF-8," + " and no encoding specified: %s\n", clean); if (charset) { - clean_msg = g_strdup_printf(_("%s (There was an error receiving this message. The charset was %s, but it was not valid UTF-8.)"), clean, charset); + clean_msg = g_strdup_printf(_("%s (There was an error receiving this message." + " The charset was %s, but it was not valid UTF-8.)"), + clean, charset); } else { - clean_msg = g_strdup_printf(_("%s (There was an error receiving this message. The charset was missing, but it was not valid UTF-8.)"), clean); + clean_msg = g_strdup_printf(_("%s (There was an error receiving this message." + " The charset was missing, but it was not valid UTF-8.)"), + clean); } g_free(clean);