2006-10-16 [colin] 2.5.5cvs8
authorColin Leroy <colin@colino.net>
Mon, 16 Oct 2006 17:13:25 +0000 (17:13 +0000)
committerColin Leroy <colin@colino.net>
Mon, 16 Oct 2006 17:13:25 +0000 (17:13 +0000)
* src/textview.c
Fix problem with quote-folding when emails
don't convert cleanly to UTF-8

ChangeLog
PATCHSETS
configure.ac
src/textview.c

index 5f13bbf94f48670b8cc7b238d7eb79efe1592c0e..0a00743e7caa8f52e94689607ef2a36d0e259adf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-10-16 [colin]     2.5.5cvs8
+
+       * src/textview.c
+               Fix problem with quote-folding when emails
+               don't convert cleanly to UTF-8
+
 2006-10-14 [colin]     2.5.5cvs7
 
        * src/prefs_template.c
index 9b2fb06cf12aac5bb370225060df9d78884cbd75..f9bc8e7e39c8d910efed150fe5799e4dbd77bce1 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.65.2.50 -r 1.65.2.51 src/codeconv.c;  ) > 2.5.5cvs5.patchset
 ( cvs diff -u -r 1.1.2.30 -r 1.1.2.31 manual/advanced.xml;  cvs diff -u -r 1.1.2.18 -r 1.1.2.19 src/prefs_message.c;  ) > 2.5.5cvs6.patchset
 ( cvs diff -u -r 1.12.2.32 -r 1.12.2.33 src/prefs_template.c;  ) > 2.5.5cvs7.patchset
+( cvs diff -u -r 1.96.2.155 -r 1.96.2.156 src/textview.c;  ) > 2.5.5cvs8.patchset
index 31e4fdf796840fed4d446c0e889d5dab19da6f9f..eb0fde8d1261c81455cea64dc513462550031ae1 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=7
+EXTRA_VERSION=8
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index d291c8cdca56b8fc7aff97b3e356d4e7612d6850..3a3ce795e7cdeae23018b5d00eb8601c871535f7 100644 (file)
@@ -1400,6 +1400,13 @@ static void textview_write_line(TextView *textview, const gchar *str,
        }
 
        if (real_quotelevel > -1 && do_quote_folding) {
+               if (!g_utf8_validate(buf, -1, NULL)) {
+                       gchar *utf8buf = NULL;
+                       utf8buf = g_malloc(BUFFSIZE);
+                       conv_localetodisp(utf8buf, BUFFSIZE, buf);
+                       strncpy2(buf, utf8buf, BUFFSIZE-1);
+                       g_free(utf8buf);
+               }
 do_quote:
                if ( previousquotelevel != real_quotelevel ) {
                        ClickableText *uri;