From 9b2ae21848a46dbc5e39c8bef1ac934445c517c8 Mon Sep 17 00:00:00 2001 From: William P Date: Sun, 23 Jul 2023 21:59:33 +0100 Subject: [PATCH] Correct UTF-8 encoding for alphabets. --- includes/hooks/WHMCS-Discord-Notifications.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/hooks/WHMCS-Discord-Notifications.php b/includes/hooks/WHMCS-Discord-Notifications.php index 01e06c9..bf8dcfa 100644 --- a/includes/hooks/WHMCS-Discord-Notifications.php +++ b/includes/hooks/WHMCS-Discord-Notifications.php @@ -579,7 +579,7 @@ function simpleFix($value){ $valueTrim = explode( "\n", wordwrap( $value, 150)); $value = $valueTrim[0] . '...'; } - $value = mb_convert_encoding($value, "UTF-8", "HTML-ENTITIES"); // Allows special characters to be displayed on Discord. + $value = iconv(mb_detect_encoding($value, mb_detect_order(), true), 'UTF-8', $value); // Allows special characters to be displayed on Discord. return $value; }