parse windows 1256 encoding type in email to fax (#7182)

This commit is contained in:
frytimo 2024-11-27 17:21:45 -04:00 committed by GitHub
parent 8563df387f
commit 7133d4bff1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 1 deletions

View File

@ -47,7 +47,11 @@ function parse_message_decode_text($connection, &$part, $message_number, $id, $o
}
}
if($charset){
$msg = mb_convert_encoding($msg, $to_charset, $charset);
if ($charset === 'windows-1256') {
$msg = iconv('windows-1256', 'utf-8', $msg);
} else {
$msg = mb_convert_encoding($msg, $to_charset, $charset);
}
}
$msg = trim($msg);
}