projects
/
modest
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
247b5f9
)
Take into account unichar space on converting to plain text quoted text
author
Jose Dapena Paz
<jdapena@igalia.com>
Mon, 7 Sep 2009 14:06:40 +0000
(16:06 +0200)
committer
Jose Dapena Paz
<jdapena@igalia.com>
Mon, 7 Sep 2009 15:40:24 +0000
(17:40 +0200)
(fixes NB#134827).
src/modest-text-utils.c
patch
|
blob
|
history
diff --git
a/src/modest-text-utils.c
b/src/modest-text-utils.c
index
020b160
..
99cb710
100644
(file)
--- 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 {
g_string_prepend (l, remaining->str);
} else {
do {
+ gunichar remaining_first;
breakpoint =
get_breakpoint (remaining->str,
rem_indent,
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);
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);
}
}
} while (remaining->len);
}