From 7133d4bff1771ee27bf8e70483a6baa2814305bf Mon Sep 17 00:00:00 2001 From: frytimo Date: Wed, 27 Nov 2024 17:21:45 -0400 Subject: [PATCH] parse windows 1256 encoding type in email to fax (#7182) --- app/fax/resources/functions/parse_message.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/fax/resources/functions/parse_message.php b/app/fax/resources/functions/parse_message.php index b4d241ba06..6e987457d6 100644 --- a/app/fax/resources/functions/parse_message.php +++ b/app/fax/resources/functions/parse_message.php @@ -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); }