function HandleMessageEncoding($encoding, $charset, $body, $blogEncoding = 'utf-8', $dequote = true) { $charset = strtolower($charset); $encoding = strtolower($encoding); /* if ($encoding == '') { $encoding = '7bit'; } */ if ($dequote && strtolower($encoding) == 'quoted-printable') { //echo "handling quoted printable"; $body = quoted_printable_decode($body); //echo "now body is:\n\n $body\n\n"; } //HandleQuotedPrintable($encoding, $body, $dequote); if ($blogEncoding == 'iso-8859-1') { $text = ConvertToISO_8859_1($encoding, $charset, $body, $blogEncoding); } else { $text = ConvertToUTF_8($encoding, $charset, $body); } return $text; }
function HandleMessageEncoding($encoding, $charset, &$body) { $charset = strtolower($charset); $encoding = strtolower($encoding); /* if ($encoding == '') { $encoding = '7bit'; } */ HandleQuotedPrintable($encoding, $body); if (isISO88591Blog()) { ConvertToISO_8859_1($encoding, $charset, $body); } else { ConvertToUTF_8($encoding, $charset, $body); } }