From: Jose Dapena Paz Date: Mon, 7 Sep 2009 14:06:40 +0000 (+0200) Subject: Take into account unichar space on converting to plain text quoted text X-Git-Tag: 3.0.17-rc50~1 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=06546fe50ce8a03df5fe73027873467aa21e6244 Take into account unichar space on converting to plain text quoted text (fixes NB#134827). --- diff --git a/src/modest-text-utils.c b/src/modest-text-utils.c index 020b160..99cb710 100644 --- a/src/modest-text-utils.c +++ b/src/modest-text-utils.c @@ -973,6 +973,7 @@ modest_text_utils_quote_body (GString *output, const gchar *text, g_string_prepend (l, remaining->str); } else { do { + gunichar remaining_first; breakpoint = get_breakpoint (remaining->str, rem_indent, @@ -981,9 +982,11 @@ modest_text_utils_quote_body (GString *output, const gchar *text, remaining, breakpoint); g_string_erase (remaining, 0, breakpoint); - if (remaining->str[0] == ' ') { - g_string_erase (remaining, 0, - 1); + remaining_first = g_utf8_get_char_validated (remaining->str, remaining->len); + if (remaining_first != ((gunichar) -1)) { + if (g_unichar_isspace (remaining_first)) { + g_string_erase (remaining, 0, g_utf8_next_char (remaining->str) - remaining->str); + } } } while (remaining->len); }