diff --git a/src/utils/utf8.php b/src/utils/utf8.php --- a/src/utils/utf8.php +++ b/src/utils/utf8.php @@ -718,7 +718,12 @@ 'mbstring')); } - $result = @mb_convert_encoding($string, $to_encoding, $from_encoding); + $available_encodings = mb_list_encodings(); + if (in_array($to_encoding, $available_encodings, true)) { + $result = @mb_convert_encoding($string, $to_encoding, $from_encoding); + } else { + $result = false; + } if ($result === false) { $message = error_get_last();