2005-02-09 [colin] 1.0.1cvs1.2
authorColin Leroy <colin@colino.net>
Wed, 9 Feb 2005 11:37:53 +0000 (11:37 +0000)
committerColin Leroy <colin@colino.net>
Wed, 9 Feb 2005 11:37:53 +0000 (11:37 +0000)
* src/codeconv.c
Fix converting from broken headers and
put back the _ in missing places
(feature broke with cvs24.2 sync, main
 possibly affected?)

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/codeconv.c

index ef0878e0bfc44369ce903187563ae61697e5a31f..017abd78023f3bfd6aa83753abde82000332cdca 100644 (file)
@@ -1,3 +1,11 @@
+2005-02-09 [colin]     1.0.1cvs1.2
+
+       * src/codeconv.c
+               Fix converting from broken headers and 
+               put back the _ in missing places
+               (feature broke with cvs24.2 sync, main 
+                possibly affected?)
+
 2005-02-09 [colin]     1.0.1cvs1.1
 
        * src/messageview.c
index 6feb286aa43aa16d3601f18742a76f85a348b0be..950146edc2dbd98fd01a46a71498599617f070f3 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.58.2.6 -r 1.58.2.7 po/de.po; cvs diff -u -r 1.60.2.7 -r 1.60.2.8 po/es.po; cvs diff -u -r 1.42.2.7 -r 1.42.2.8 po/fr.po; cvs diff -u -r 1.34.2.6 -r 1.34.2.7 po/it.po; cvs diff -u -r 1.2.2.8 -r 1.2.2.9 po/sk.po; cvs diff -u -r 1.17.2.8 -r 1.17.2.9 po/sr.po; ) > 1.0.0cvs29.1.patchset
 ( cvs diff -u -r 1.2504.2.46 -r 1.2504.2.47 ChangeLog.claws; cvs diff -u -r 1.50.2.5 -r 1.50.2.6 po/pt_BR.po; ) > 1.0.1.1.patchset
 ( cvs diff -u -r 1.94.2.42 -r 1.94.2.43 src/messageview.c; cvs diff -u -r 1.83.2.27 -r 1.83.2.28 src/mimeview.c; cvs diff -u -r 1.20.2.2 -r 1.20.2.3 src/mimeview.h; ) > 1.0.1cvs1.1.patchset
+( cvs diff -u -r 1.65.2.21 -r 1.65.2.22 src/codeconv.c; ) > 1.0.1cvs1.2.patchset
index db29f342ee6100266df1987570e8877f8608e82e..d5ba74c31f442bba6ff7fe1df8d45f7db31fc742 100644 (file)
@@ -13,7 +13,7 @@ INTERFACE_AGE=0
 BINARY_AGE=0
 EXTRA_VERSION=1
 EXTRA_RELEASE=
-EXTRA_GTK2_VERSION=.1
+EXTRA_GTK2_VERSION=.2
 
 if test \( $EXTRA_VERSION -eq 0 \) -o \( "x$EXTRA_RELEASE" != "x" \); then
     VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}${EXTRA_RELEASE}${EXTRA_GTK2_VERSION}
index 4a295d6d77c139e48bf4574e7e93954f2608df9f..e24a840c023df93e21955215486ee1dba9d8cf9a 100644 (file)
@@ -1572,8 +1572,25 @@ void conv_unmime_header(gchar *outbuf, gint outlen, const gchar *str,
                Xalloca(buf, buflen, return);
                conv_anytodisp(buf, buflen, str);
                unmime_header(outbuf, buf);
-       } else
+       } else {
+               gchar *tmp = NULL;
                unmime_header(outbuf, str);
+
+               if (outbuf && !g_utf8_validate(outbuf, -1, NULL)) {
+                       if (conv_get_locale_charset() != C_INTERNAL)
+                               tmp = conv_codeset_strdup(outbuf,
+                                       conv_get_locale_charset_str(),
+                                       CS_INTERNAL);
+
+                       if (tmp) {
+                               strncpy(outbuf, tmp, outlen-1);
+                               g_free(tmp);
+                       } else {
+                               conv_unreadable_8bit(outbuf);
+                       }
+               }
+       }
+
 }
 
 #define MAX_LINELEN            76