From 88be4bea463cc05caa86079aaaa7ebe3536e8f4c Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 10 Nov 2011 15:19:12 +0000 Subject: [PATCH] handle utf-16 plain text attachments --- felamimail/inc/class.bofelamimail.inc.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/felamimail/inc/class.bofelamimail.inc.php b/felamimail/inc/class.bofelamimail.inc.php index 7d62282e55..0e73285bae 100644 --- a/felamimail/inc/class.bofelamimail.inc.php +++ b/felamimail/inc/class.bofelamimail.inc.php @@ -1248,6 +1248,10 @@ default: // it is either not encoded or we don't know about it } + if ($structure->type === 'TEXT' && isset($structure->parameters['CHARSET']) && stripos('UTF-16',$structure->parameters['CHARSET'])!==false) + { + $attachment = translation::convert($attachment,$structure->parameters['CHARSET'],self::$displayCharset); + } $attachmentData = array( 'type' => $structure->type .'/'. $structure->subType,