From 0aeec1cc4c67c4b44dbcb98be1dee47ba6863db6 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Wed, 9 Feb 2005 11:37:53 +0000 Subject: [PATCH] 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?) --- ChangeLog-gtk2.claws | 8 ++++++++ PATCHSETS | 1 + configure.ac | 2 +- src/codeconv.c | 19 ++++++++++++++++++- 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/ChangeLog-gtk2.claws b/ChangeLog-gtk2.claws index ef0878e0b..017abd780 100644 --- a/ChangeLog-gtk2.claws +++ b/ChangeLog-gtk2.claws @@ -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 diff --git a/PATCHSETS b/PATCHSETS index 6feb286aa..950146edc 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -364,3 +364,4 @@ ( 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 diff --git a/configure.ac b/configure.ac index db29f342e..d5ba74c31 100644 --- a/configure.ac +++ b/configure.ac @@ -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} diff --git a/src/codeconv.c b/src/codeconv.c index 4a295d6d7..e24a840c0 100644 --- a/src/codeconv.c +++ b/src/codeconv.c @@ -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 -- 2.25.1