diff options
author | Matteo Bernardini <ponce@slackbuilds.org> | 2012-09-26 07:44:18 +0200 |
---|---|---|
committer | Matteo Bernardini <ponce@slackbuilds.org> | 2012-09-26 07:57:54 +0200 |
commit | b32019f8714332a228e6f1eaeb08e6f262118183 (patch) | |
tree | 1487b8a5739791749ba86141a7fe9bf4ae9a5750 /libraries/libvmime-zarafa | |
parent | f751cc741a40d5b4fa961a8d4898c6da85aa557c (diff) | |
download | slackbuilds-b32019f8714332a228e6f1eaeb08e6f262118183.tar.gz |
libraries/libvmime-zarafa: Updated for version 0.9.2_svn603.
Modified library name to libvmime_zarafa,
rewritten name.patch
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'libraries/libvmime-zarafa')
6 files changed, 299 insertions, 49 deletions
diff --git a/libraries/libvmime-zarafa/libvmime-zarafa.SlackBuild b/libraries/libvmime-zarafa/libvmime-zarafa.SlackBuild index 3080456b97..16102861f7 100644 --- a/libraries/libvmime-zarafa/libvmime-zarafa.SlackBuild +++ b/libraries/libvmime-zarafa/libvmime-zarafa.SlackBuild @@ -27,7 +27,7 @@ # revision date 2011/09/16 PRGNAM=libvmime-zarafa -VERSION=${VERSION:-0.9.1_p20110328} +VERSION=${VERSION:-0.9.2_svn603} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -41,6 +41,7 @@ fi PRGSRC=libvmime SRCVERSION=$(echo $VERSION | cut -f1 -d_) +TARVERSION=$(echo $VERSION | tr _ +) CWD=$(pwd) TMP=${TMP:-/tmp/SBo} @@ -66,27 +67,21 @@ set -e rm -rf $TMP/$PRGSRC-$SRCVERSION $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -tar xvf $CWD/$PRGSRC-$SRCVERSION.tar.bz2 +tar xvf $CWD/$PRGSRC-$TARVERSION.tar.bz2 cd $PRGSRC-$SRCVERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . # Apply zarafa patches in order of release-date patches="\ - 0.8.1-charset-catch \ - 0.8.1-attachfnamelen \ - 0.8.1-header-value-on-next-line \ - highchar-filename \ - 0.8.1-unicode-1-1-utf-7-charset \ - fullname-without-email-address \ - 0.9.0-undisclosed-recipients \ - 0.9.2-infinite-loop \ - flush-iconv" + mixed-qp-in-parameter \ + 0.9.2-header-value-on-next-line \ + 0.9.2-qp-in-buffers" for patch in $patches; do - patch -p1 < $CWD/vmime-$patch.diff + patch -p1 < $CWD/patches/vmime-$patch.diff done -# Patch "configure" & src/Makefile.in to rename the library to "libvmime-zarafa" +# Patch to rename the library to "libvmime_zarafa" patch -p1 < $CWD/name.patch EXTRA_CFLAGS=$SLKCFLAGS \ @@ -106,13 +101,11 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \ # correct program name. # We're moving some files so that this special version of libvmime # can coexist with the standard version, if needed. -mkdir -p $PKG/usr/include/vmime-zarafa -mv $PKG/usr/include/vmime $PKG/usr/include/vmime-zarafa - -mv $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/vmime.pc \ - $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/vmime-zarafa.pc -sed -i "s/vmime/vmime-zarafa/g" \ - $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/vmime-zarafa.pc +mkdir -p $PKG/usr/include/vmime +mv $PKG/usr/include/vmime_zarafa/* $PKG/usr/include/vmime/ +mv $PKG/usr/include/vmime $PKG/usr/include/vmime_zarafa/ +sed -i "s|{includedir}/|{includedir}/vmime_zarafa|" \ + $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/vmime_zarafa.pc cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild diff --git a/libraries/libvmime-zarafa/libvmime-zarafa.info b/libraries/libvmime-zarafa/libvmime-zarafa.info index 4dc7931f9b..19b3090c17 100644 --- a/libraries/libvmime-zarafa/libvmime-zarafa.info +++ b/libraries/libvmime-zarafa/libvmime-zarafa.info @@ -1,26 +1,8 @@ PRGNAM="libvmime-zarafa" -VERSION="0.9.1_p20110328" +VERSION="0.9.2_svn603" HOMEPAGE="http://www.vmime.org/" -DOWNLOAD="http://downloads.sourceforge.net/vmime/libvmime-0.9.1.tar.bz2 \ - http://download.zarafa.com/community/final/7.0/7.0.1-28479/sourcecode/vmime-patches/vmime-0.8.1-attachfnamelen.diff \ - http://download.zarafa.com/community/final/7.0/7.0.1-28479/sourcecode/vmime-patches/vmime-0.8.1-charset-catch.diff \ - http://download.zarafa.com/community/final/7.0/7.0.1-28479/sourcecode/vmime-patches/vmime-0.8.1-header-value-on-next-line.diff \ - http://download.zarafa.com/community/final/7.0/7.0.1-28479/sourcecode/vmime-patches/vmime-0.8.1-unicode-1-1-utf-7-charset.diff \ - http://download.zarafa.com/community/final/7.0/7.0.1-28479/sourcecode/vmime-patches/vmime-0.9.0-undisclosed-recipients.diff \ - http://download.zarafa.com/community/final/7.0/7.0.1-28479/sourcecode/vmime-patches/vmime-0.9.2-infinite-loop.diff \ - http://download.zarafa.com/community/final/7.0/7.0.1-28479/sourcecode/vmime-patches/vmime-flush-iconv.diff \ - http://download.zarafa.com/community/final/7.0/7.0.1-28479/sourcecode/vmime-patches/vmime-fullname-without-email-address.diff \ - http://download.zarafa.com/community/final/7.0/7.0.1-28479/sourcecode/vmime-patches/vmime-highchar-filename.diff" -MD5SUM="d5b6de44f7f9ca0e4cefe597d1905605 \ - 2850f22789405efefe2f28a276d9a2c2 \ - 4d542b58c57ebc57c315db9d4fef9648 \ - 7b6881e7e8d2d4ef7fe4ee95397fd9a7 \ - 4e3687cc1d5343e0b74a8b0ceedf976b \ - e59e0c691223c3854f0d05bc05840af8 \ - b98d90a6a3426011bf906cc05dd7764a \ - d009c57b5bae2da1637e4fcc12d5402e \ - 793a367c4d4d3b76337b77ae0460f3fd \ - 5af720f59e0f3a332b2615957082fa48" +DOWNLOAD="http://download.zarafa.com/community/final/7.1/7.1.0-36420/sourcecode/libvmime-0.9.2+svn603.tar.bz2" +MD5SUM="0ba65ad889488b2f851d7f028bfb6e9e" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="libgsasl" diff --git a/libraries/libvmime-zarafa/name.patch b/libraries/libvmime-zarafa/name.patch index fc82cf0b0b..84fafbe756 100644 --- a/libraries/libvmime-zarafa/name.patch +++ b/libraries/libvmime-zarafa/name.patch @@ -1,20 +1,206 @@ ---- libvmime-0.7.1_orig/configure 2005-06-21 19:11:26.000000000 -0300 -+++ libvmime-0.7.1/configure 2009-12-26 15:30:12.000000000 -0200 -@@ -1557,7 +1557,7 @@ - GENERIC_VERSIONED_LIBRARY_NAME="vmime" +diff -Naur libvmime-0.9.2.orig/Makefile.in libvmime-0.9.2/Makefile.in +--- libvmime-0.9.2.orig/Makefile.in 2012-01-10 10:33:02.000000000 +0100 ++++ libvmime-0.9.2/Makefile.in 2012-09-26 05:00:51.899012736 +0200 +@@ -42,7 +42,7 @@ + DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ +- $(srcdir)/config.h.in $(srcdir)/vmime.pc.in ++ $(srcdir)/config.h.in $(srcdir)/vmime_zarafa.pc.in + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ + $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/lib-ld.m4 \ +@@ -56,7 +56,7 @@ + configure.lineno config.status.lineno + mkinstalldirs = $(install_sh) -d + CONFIG_HEADER = config.h +-CONFIG_CLEAN_FILES = vmime.pc ++CONFIG_CLEAN_FILES = vmime_zarafa.pc + CONFIG_CLEAN_VPATH_FILES = + SOURCES = + RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ +@@ -314,7 +314,7 @@ + + distclean-hdr: + -rm -f config.h stamp-h1 +-vmime.pc: $(top_builddir)/config.status $(srcdir)/vmime.pc.in ++vmime_zarafa.pc: $(top_builddir)/config.status $(srcdir)/vmime_zarafa.pc.in + cd $(top_builddir) && $(SHELL) ./config.status $@ + + mostlyclean-libtool: +diff -Naur libvmime-0.9.2.orig/configure libvmime-0.9.2/configure +--- libvmime-0.9.2.orig/configure 2012-01-10 10:33:01.000000000 +0100 ++++ libvmime-0.9.2/configure 2012-09-26 04:55:30.835971484 +0200 +@@ -699,10 +699,10 @@ + MAKEFLAGS= + + # Identity of this package. +-PACKAGE_NAME='VMime Library' +-PACKAGE_TARNAME='vmime' ++PACKAGE_NAME='VMime Library for Zarafa' ++PACKAGE_TARNAME='vmime_zarafa' + PACKAGE_VERSION='0.9.2' +-PACKAGE_STRING='VMime Library 0.9.2' ++PACKAGE_STRING='VMime Library 0.9.2 for Zarafa' + PACKAGE_BUGREPORT='vincent@vincent-richard.net' + PACKAGE_URL='' + +@@ -2939,13 +2939,13 @@ + + + # Library name +-GENERIC_LIBRARY_NAME="vmime" ++GENERIC_LIBRARY_NAME="vmime_zarafa" + + +-GENERIC_VERSIONED_LIBRARY_NAME="vmime" ++GENERIC_VERSIONED_LIBRARY_NAME="vmime_zarafa" -LIBRARY_NAME="libvmime" -+LIBRARY_NAME="libvmime-zarafa" ++LIBRARY_NAME="libvmime_zarafa" # Library version -@@ -25237,7 +25237,7 @@ +@@ -3508,7 +3508,7 @@ + + + # Define the identity of the package. +- PACKAGE=vmime ++ PACKAGE=vmime_zarafa + VERSION=0.9.2 + + +@@ -21556,7 +21556,7 @@ + + LIBS=`echo $LIBS | sed -e 's|^ ||g' | sed -e 's| | |g'` + +-ac_config_files="$ac_config_files vmime.pc Makefile src/Makefile vmime/Makefile" ++ac_config_files="$ac_config_files vmime_zarafa.pc Makefile src/Makefile vmime/Makefile" + + cat >confcache <<\_ACEOF + # This file is a shell script that caches the results of configure +@@ -22754,7 +22754,7 @@ + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; +- "vmime.pc") CONFIG_FILES="$CONFIG_FILES vmime.pc" ;; ++ "vmime_zarafa.pc") CONFIG_FILES="$CONFIG_FILES vmime_zarafa.pc" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "vmime/Makefile") CONFIG_FILES="$CONFIG_FILES vmime/Makefile" ;; +@@ -24301,7 +24301,7 @@ // Name of package -#define VMIME_PACKAGE \"libvmime\" -+#define VMIME_PACKAGE \"libvmime-zarafa\" ++#define VMIME_PACKAGE \"libvmime_zarafa\" // Version number of package - #define VMIME_VERSION \"0.7.1\" + #define VMIME_VERSION \"0.9.2\" +diff -Naur libvmime-0.9.2.orig/src/Makefile.in libvmime-0.9.2/src/Makefile.in +--- libvmime-0.9.2.orig/src/Makefile.in 2012-01-10 10:33:02.000000000 +0100 ++++ libvmime-0.9.2/src/Makefile.in 2012-09-26 04:41:07.134000010 +0200 +@@ -149,8 +149,8 @@ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' + am__installdirs = "$(DESTDIR)$(libdir)" + LTLIBRARIES = $(lib_LTLIBRARIES) +-libvmime_la_LIBADD = +-am__libvmime_la_SOURCES_DIST = address.cpp addressList.cpp \ ++libvmime_zarafa_la_LIBADD = ++am__libvmime_zarafa_la_SOURCES_DIST = address.cpp addressList.cpp \ + attachmentHelper.cpp base.cpp body.cpp bodyPart.cpp \ + bodyPartAttachment.cpp charset.cpp charsetConverter.cpp \ + component.cpp constants.cpp contentDisposition.cpp \ +@@ -286,7 +286,7 @@ + @VMIME_BUILTIN_PLATFORM_POSIX_TRUE@ platforms_posix_posixFile.lo \ + @VMIME_BUILTIN_PLATFORM_POSIX_TRUE@ platforms_posix_posixHandler.lo \ + @VMIME_BUILTIN_PLATFORM_POSIX_TRUE@ platforms_posix_posixSocket.lo +-am_libvmime_la_OBJECTS = address.lo addressList.lo attachmentHelper.lo \ ++am_libvmime_zarafa_la_OBJECTS = address.lo addressList.lo attachmentHelper.lo \ + base.lo body.lo bodyPart.lo bodyPartAttachment.lo charset.lo \ + charsetConverter.lo component.lo constants.lo \ + contentDisposition.lo contentDispositionField.lo \ +@@ -322,10 +322,10 @@ + $(am__objects_2) $(am__objects_3) $(am__objects_4) \ + $(am__objects_5) $(am__objects_6) $(am__objects_7) \ + $(am__objects_8) $(am__objects_9) $(am__objects_10) +-libvmime_la_OBJECTS = $(am_libvmime_la_OBJECTS) +-libvmime_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ ++libvmime_zarafa_la_OBJECTS = $(am_libvmime_zarafa_la_OBJECTS) ++libvmime_zarafa_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ +- $(CXXFLAGS) $(libvmime_la_LDFLAGS) $(LDFLAGS) -o $@ ++ $(CXXFLAGS) $(libvmime_zarafa_la_LDFLAGS) $(LDFLAGS) -o $@ + DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) + depcomp = + am__depfiles_maybe = +@@ -338,7 +338,7 @@ + CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +-SOURCES = $(libvmime_la_SOURCES) ++SOURCES = $(libvmime_zarafa_la_SOURCES) + DIST_SOURCES = $(am__libvmime_la_SOURCES_DIST) + HEADERS = $(noinst_HEADERS) + ETAGS = etags +@@ -499,9 +499,9 @@ + AUTOMAKE_OPTIONS = no-dependencies foreign + INTERNALS = + INCLUDES = -I$(prefix)/include -I$(top_srcdir) @PKGCONFIG_CFLAGS@ @EXTRA_CFLAGS@ +-lib_LTLIBRARIES = libvmime.la +-libvmime_la_LDFLAGS = -export-dynamic -version-info @LIBRARY_VERSION@ @PKGCONFIG_LIBS@ @EXTRA_LIBS@ +-libvmime_la_SOURCES = address.cpp addressList.cpp attachmentHelper.cpp \ ++lib_LTLIBRARIES = libvmime_zarafa.la ++libvmime_zarafa_la_LDFLAGS = -export-dynamic -version-info @LIBRARY_VERSION@ @PKGCONFIG_LIBS@ @EXTRA_LIBS@ ++libvmime_zarafa_la_SOURCES = address.cpp addressList.cpp attachmentHelper.cpp \ + base.cpp body.cpp bodyPart.cpp bodyPartAttachment.cpp \ + charset.cpp charsetConverter.cpp component.cpp constants.cpp \ + contentDisposition.cpp contentDispositionField.cpp \ +@@ -607,8 +607,8 @@ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +-libvmime.la: $(libvmime_la_OBJECTS) $(libvmime_la_DEPENDENCIES) +- $(libvmime_la_LINK) -rpath $(libdir) $(libvmime_la_OBJECTS) $(libvmime_la_LIBADD) $(LIBS) ++libvmime_zarafa.la: $(libvmime_zarafa_la_OBJECTS) $(libvmime_zarafa_la_DEPENDENCIES) ++ $(libvmime_zarafa_la_LINK) -rpath $(libdir) $(libvmime_zarafa_la_OBJECTS) $(libvmime_zarafa_la_LIBADD) $(LIBS) + + mostlyclean-compile: + -rm -f *.$(OBJEXT) +diff -Naur libvmime-0.9.2.orig/vmime.pc.in libvmime-0.9.2/vmime.pc.in +--- libvmime-0.9.2.orig/vmime.pc.in 2012-01-10 10:32:57.000000000 +0100 ++++ libvmime-0.9.2/vmime.pc.in 1970-01-01 01:00:00.000000000 +0100 +@@ -1,14 +0,0 @@ +-# File automatically generated by SConstruct ('scons autotools') +-# DO NOT EDIT! +- +-prefix=@prefix@ +-exec_prefix=@exec_prefix@ +-libdir=@libdir@ +-includedir=@includedir@ +- +-Name: @GENERIC_LIBRARY_NAME@ +-Description: VMime C++ Mail Library (http://www.vmime.org) +-Version: @VERSION@ +-Requires: @GSASL_REQUIRED@ +-Libs: -L${libdir} -l@GENERIC_VERSIONED_LIBRARY_NAME@ @GSASL_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @PTHREAD_LIBS@ @LIBICONV@ @PTHREAD_LIBS@ @VMIME_ADDITIONAL_PC_LIBS@ +-Cflags: -I${includedir}/ @LIBGNUTLS_CFLAGS@ +diff -Naur libvmime-0.9.2.orig/vmime_zarafa.pc.in libvmime-0.9.2/vmime_zarafa.pc.in +--- libvmime-0.9.2.orig/vmime_zarafa.pc.in 1970-01-01 01:00:00.000000000 +0100 ++++ libvmime-0.9.2/vmime_zarafa.pc.in 2012-01-10 10:32:57.000000000 +0100 +@@ -0,0 +1,14 @@ ++# File automatically generated by SConstruct ('scons autotools') ++# DO NOT EDIT! ++ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++Name: @GENERIC_LIBRARY_NAME@ ++Description: VMime C++ Mail Library (http://www.vmime.org) ++Version: @VERSION@ ++Requires: @GSASL_REQUIRED@ ++Libs: -L${libdir} -l@GENERIC_VERSIONED_LIBRARY_NAME@ @GSASL_LIBS@ @LIBGNUTLS_LIBS@ @LIBICONV@ @PTHREAD_LIBS@ @LIBICONV@ @PTHREAD_LIBS@ @VMIME_ADDITIONAL_PC_LIBS@ ++Cflags: -I${includedir}/ @LIBGNUTLS_CFLAGS@ diff --git a/libraries/libvmime-zarafa/patches/vmime-0.9.2-header-value-on-next-line.diff b/libraries/libvmime-zarafa/patches/vmime-0.9.2-header-value-on-next-line.diff new file mode 100644 index 0000000000..eca769946b --- /dev/null +++ b/libraries/libvmime-zarafa/patches/vmime-0.9.2-header-value-on-next-line.diff @@ -0,0 +1,45 @@ +diff -Nurb libvmime-0.9.2.orig/src/headerField.cpp libvmime-0.9.2.patched/src/headerField.cpp +--- libvmime-0.9.2.orig/src/headerField.cpp 2010-05-20 05:33:45.000000000 -0700 ++++ libvmime-0.9.2.patched/src/headerField.cpp 2011-08-29 12:10:08.438497914 -0700 +@@ -157,14 +157,12 @@ + { + contentsEnd = pos; + pos += 2; +- break; + } + else if (c == '\n') + { + contentsEnd = pos; + ++pos; +- break; +- } ++ } else { + + while (pos < end) + { +@@ -186,24 +184,13 @@ + + ++pos; + } ++ } + + // Handle the case of folded lines + if (buffer[pos] == ' ' || buffer[pos] == '\t') + { + // This is a folding white-space: we keep it as is and + // we continue with contents parsing... +- +- // If the line contains only space characters, we assume it is +- // the end of the headers. This is not strictly standard-compliant +- // but, hey, we can't fail when parsing some malformed mails... +- while (pos < end && (buffer[pos] == ' ' || buffer[pos] == '\t')) +- ++pos; +- +- if ((pos < end && buffer[pos] == '\n') || +- (pos + 1 < end && buffer[pos] == '\r' && buffer[pos + 1] == '\n')) +- { +- break; +- } + } + else + { diff --git a/libraries/libvmime-zarafa/patches/vmime-0.9.2-qp-in-buffers.diff b/libraries/libvmime-zarafa/patches/vmime-0.9.2-qp-in-buffers.diff new file mode 100644 index 0000000000..7634edd1bc --- /dev/null +++ b/libraries/libvmime-zarafa/patches/vmime-0.9.2-qp-in-buffers.diff @@ -0,0 +1,16 @@ +--- svn/src/wordEncoder.cpp (revision 603) ++++ svn/src/wordEncoder.cpp (working copy) +@@ -239,6 +239,13 @@ + if (buffer.find_first_of("\n\r") != string::npos) + return true; + ++ // If the string contains a QP string, we need to encode this. ++ // Not a 100% check, but we'd only get more encoded strings. ++ std::string::size_type pos = buffer.find("=?"); ++ std::string::size_type end = buffer.find("?="); ++ if (pos != string::npos && end != string::npos && end > pos) ++ return true; ++ + return false; + } + diff --git a/libraries/libvmime-zarafa/patches/vmime-mixed-qp-in-parameter.diff b/libraries/libvmime-zarafa/patches/vmime-mixed-qp-in-parameter.diff new file mode 100644 index 0000000000..78e6c70e49 --- /dev/null +++ b/libraries/libvmime-zarafa/patches/vmime-mixed-qp-in-parameter.diff @@ -0,0 +1,28 @@ +Index: svn/src/parameter.cpp +=================================================================== +--- svn/src/parameter.cpp (revision 597) ++++ svn/src/parameter.cpp (working copy) +@@ -239,8 +239,21 @@ + { + value << t.getWholeBuffer(); + +- if (!foundCharsetChunk) +- ch = t.getWordAt(0)->getCharset(); ++ if (!foundCharsetChunk) { ++ // this is still wrong. each word can have it's ++ // own charset, and can be mixed (eg. iso-8859-1 ++ // and iso-2022-jp), but very unlikely. ++ // real fix is to have parameters store a ++ // vmime::text in stead of a vmime::word in ++ // m_value. but that changes the interface ++ for (size_t i = 0; i < t.getWordCount(); i++) { ++ if (t.getWordAt(i)->getCharset() != ch && ch == charsets::US_ASCII) { ++ ch = t.getWordAt(i)->getCharset(); ++ break; ++ } ++ } ++ ++ } + } + } + } |