Still not working
Hi,
Thanks for the link to the post.
So I've checked :
The database encoding : utf8_general_ci
The email encoding (from Outlook client) : US-ASCII
Then I tried the following :
Change in : include/class.mailfetch.php :
//Generic decoder - mirrors imap_utf8
function mime_decode($text) {
$a = imap_mime_header_decode($text);
$str = '';
foreach ($a as $k => $part)
$str.= $part->text;
return $str?$str($text);
}
Replaced by :
//Generic decoder - mirrors imap_utf8
function mime_decode($text) {
$a = imap_utf8($text);
$str = '';
foreach ($a as $k => $part)
$str.= $part->text;
return $str?$str($text);
}
And :
$encodings=array('UTF-8','WINDOWS-1251', 'ISO-8859-5', 'ISO-8859-1','KOI8-R');
if(function_exists("iconv") and $text) {
if($charset)
return iconv($charset,$enc.'//IGNORE',$text);
elseif(function_exists("mb_detect_encoding"))
return iconv(mb_detect_encoding($text,$encodings),$enc,$text);
}
return utf8_encode($text);
}
Replaced by :
function mime_encode($text, $charset=null, $enc='utf-8') {
$encodings = array('UTF-8','WINDOWS-1251', 'WINDOWS-1252', 'ISO-8859-1', 'ISO-8859-15', 'US-ASCII', 'koi8-r');
if($charset){
$charset = strtoupper($charset);
$text = iconv($charset, $enc.'//IGNORE', $text);
}else{
$sourceEncoding = mb_detect_encoding($text, $encodings);
$text = iconv($sourceEncoding, $enc . '//IGNORE', $text);
}
return $text;
}
And this is not working, the body content is still truncated at the first newline (you know when you leave a space between two lines.. sorry but i'm french and not sure to use the proper word with newline ;))
Do I miss something here ?