2006-03-26 [colin] 2.0.0cvs172
authorColin Leroy <colin@colino.net>
Sun, 26 Mar 2006 16:52:33 +0000 (16:52 +0000)
committerColin Leroy <colin@colino.net>
Sun, 26 Mar 2006 16:52:33 +0000 (16:52 +0000)
* src/procheader.c
Make sure the date is UTF8 valid, or try to make it
so. IncrediMail is really IncrediStupid.
* src/compose.c
Fix possible conversions.

ChangeLog
PATCHSETS
configure.ac
src/compose.c
src/procheader.c

index 0ab87295b16385f653e53a5c883605ebe6e325d3..e752e6ea63308733825323a0d455bf38feedcfd4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-03-26 [colin]     2.0.0cvs172
+
+       * src/procheader.c
+               Make sure the date is UTF8 valid, or try to make it
+               so. IncrediMail is really IncrediStupid.
+       * src/compose.c
+               Fix possible conversions. 
+               
+
 2006-03-26 [colin]     2.0.0cvs171
 
        * src/matcher.c
 2006-03-26 [colin]     2.0.0cvs171
 
        * src/matcher.c
index 8dbfc6dca823cec4ebc89d49f8905c7a5559dde9..81e1aa773835fbfe1f6389b510f1f51ee428c32d 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.75.2.17 -r 1.75.2.18 src/matcher.c;  cvs diff -u -r 1.3.2.5 -r 1.3.2.6 src/common/quoted-printable.c;  cvs diff -u -r 1.3.2.2 -r 1.3.2.3 src/common/quoted-printable.h;  ) > 2.0.0cvs169.patchset
 ( cvs diff -u -r 1.395.2.187 -r 1.395.2.188 src/summaryview.c;  ) > 2.0.0cvs170.patchset
 ( cvs diff -u -r 1.75.2.18 -r 1.75.2.19 src/matcher.c;  ) > 2.0.0cvs171.patchset
 ( cvs diff -u -r 1.75.2.17 -r 1.75.2.18 src/matcher.c;  cvs diff -u -r 1.3.2.5 -r 1.3.2.6 src/common/quoted-printable.c;  cvs diff -u -r 1.3.2.2 -r 1.3.2.3 src/common/quoted-printable.h;  ) > 2.0.0cvs169.patchset
 ( cvs diff -u -r 1.395.2.187 -r 1.395.2.188 src/summaryview.c;  ) > 2.0.0cvs170.patchset
 ( cvs diff -u -r 1.75.2.18 -r 1.75.2.19 src/matcher.c;  ) > 2.0.0cvs171.patchset
+( cvs diff -u -r 1.47.2.27 -r 1.47.2.28 src/procheader.c;  cvs diff -u -r 1.382.2.255 -r 1.382.2.256 src/compose.c;  ) > 2.0.0cvs172.patchset
index 2df2a1c9dcc6aa5244d52bacd00ca4b09c1fc3e7..6c34038c8ba54ce128f931b56c91404c0c6744e8 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=171
+EXTRA_VERSION=172
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index aea95b2d214c8b3bb13bc68d4191e3ab9a8f8d6f..dfe95226a1b62729ac3b49071083b9e9c66d4e7b 100644 (file)
@@ -2285,7 +2285,7 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
        } else {
                gchar *tmpout = NULL;
                tmpout = conv_codeset_strdup
        } else {
                gchar *tmpout = NULL;
                tmpout = conv_codeset_strdup
-                       (buf, conv_get_locale_charset_str(),
+                       (buf, conv_get_locale_charset_str_no_utf8(),
                         CS_INTERNAL);
                if (!tmpout || !g_utf8_validate(tmpout, -1, NULL)) {
                        g_free(tmpout);
                         CS_INTERNAL);
                if (!tmpout || !g_utf8_validate(tmpout, -1, NULL)) {
                        g_free(tmpout);
@@ -2707,7 +2707,7 @@ static gchar *compose_get_signature_str(Compose *compose)
                        utf8_sig_str = sig_str;
                else {
                        utf8_sig_str = conv_codeset_strdup
                        utf8_sig_str = sig_str;
                else {
                        utf8_sig_str = conv_codeset_strdup
-                               (sig_str, conv_get_locale_charset_str(),
+                               (sig_str, conv_get_locale_charset_str_no_utf8(),
                                 CS_INTERNAL);
                        g_free(sig_str);
                }
                                 CS_INTERNAL);
                        g_free(sig_str);
                }
index c2e151e2b7ba7eb0dae3aeb703222a5758277818..bca7e19ef8cfc72f79dbcfe6ca7eaaec65a950ee 100644 (file)
@@ -453,7 +453,22 @@ static MsgInfo *parse_stream(void *data, gboolean isstring, MsgFlags flags,
                        if (msginfo->date) break;
                        msginfo->date_t =
                                procheader_date_parse(NULL, hp, 0);
                        if (msginfo->date) break;
                        msginfo->date_t =
                                procheader_date_parse(NULL, hp, 0);
-                       msginfo->date = g_strdup(hp);
+                       if (g_utf8_validate(hp, -1, NULL)) {
+                               msginfo->date = g_strdup(hp);
+                       } else {
+                               gchar *utf = conv_codeset_strdup(
+                                       hp, 
+                                       conv_get_locale_charset_str_no_utf8(),
+                                       CS_INTERNAL);
+                               if (utf == NULL || 
+                                   !g_utf8_validate(utf, -1, NULL)) {
+                                       g_free(utf);
+                                       utf = g_malloc(strlen(buf)*2+1);
+                                       conv_localetodisp(utf, 
+                                               strlen(hp)*2+1, hp);
+                               }
+                               msginfo->date = utf;
+                       }
                        break;
                case H_FROM:
                        if (msginfo->from) break;
                        break;
                case H_FROM:
                        if (msginfo->from) break;