Add newlines to debug messages, and word-wrap lines.
authorElliott Sales de Andrade <qulogic@pidgin.im>
Sat, 28 Jan 2012 06:05:48 +0000
changesetf5fd49c83637 pushlog
parent f9eeb175a5c9
child 5c02bc93f2c4
Add newlines to debug messages, and word-wrap lines.
libpurple/protocols/msn/oim.c
     1.1 --- a/libpurple/protocols/msn/oim.c
     1.2 +++ b/libpurple/protocols/msn/oim.c
     1.3 @@ -660,16 +660,17 @@
     1.4  		charset = msn_message_get_charset(message);
     1.5  	}
     1.6  
     1.7 -
     1.8  	if (charset && !((strncasecmp(charset, "UTF-8", 5) == 0) || (strncasecmp(charset, "UTF8", 4) == 0))) {
     1.9  		clean_msg = g_convert(decode_msg, strlen(decode_msg), "UTF-8", charset, NULL, NULL, NULL);
    1.10  
    1.11  		if (!clean_msg) {
    1.12  			char *clean = purple_utf8_salvage(decode_msg);
    1.13  
    1.14 -			purple_debug_error("msn", "Failed to convert charset from %s to UTF-8 for OIM message: %s", charset, clean);
    1.15 +			purple_debug_error("msn", "Failed to convert charset from %s to UTF-8 for OIM message: %s\n", charset, clean);
    1.16  
    1.17 -			clean_msg = g_strdup_printf(_("%s (There was an error receiving this message. Converting the encoding from %s to UTF-8 failed.)"), clean, charset);
    1.18 +			clean_msg = g_strdup_printf(_("%s (There was an error receiving this message. "
    1.19 +			                              "Converting the encoding from %s to UTF-8 failed.)"),
    1.20 +			                            clean, charset);
    1.21  			g_free(clean);
    1.22  		}
    1.23  
    1.24 @@ -679,12 +680,17 @@
    1.25  		if (!g_utf8_validate(decode_msg, -1, NULL)) {
    1.26  			char *clean = purple_utf8_salvage(decode_msg);
    1.27  
    1.28 -			purple_debug_error("msn", "Received an OIM message that is not UTF-8, and no encoding specified: %s", clean);
    1.29 +			purple_debug_error("msn", "Received an OIM message that is not UTF-8,"
    1.30 +			                          " and no encoding specified: %s\n", clean);
    1.31  
    1.32  			if (charset) {
    1.33 -				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);
    1.34 +				clean_msg = g_strdup_printf(_("%s (There was an error receiving this message."
    1.35 +				                              " The charset was %s, but it was not valid UTF-8.)"),
    1.36 +				                            clean, charset);
    1.37  			} else {
    1.38 -				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);
    1.39 +				clean_msg = g_strdup_printf(_("%s (There was an error receiving this message."
    1.40 +				                              " The charset was missing, but it was not valid UTF-8.)"),
    1.41 +				                            clean);
    1.42  			}
    1.43  
    1.44  			g_free(clean);