From: Tim Düsterhus Date: Fri, 13 May 2022 08:49:52 +0000 (+0200) Subject: Remove use of `utf8_encode` / `utf8_decode` X-Git-Tag: 6.0.0_Alpha_1~1299^2~2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=19dadec9e9e337c4636f522da356ce461321a3ef;p=GitHub%2FWoltLab%2FWCF.git Remove use of `utf8_encode` / `utf8_decode` These functions will be deprecated with PHP 8.2. --- diff --git a/wcfsetup/install/files/lib/util/StringUtil.class.php b/wcfsetup/install/files/lib/util/StringUtil.class.php index dc981c3dff..a65fdff174 100644 --- a/wcfsetup/install/files/lib/util/StringUtil.class.php +++ b/wcfsetup/install/files/lib/util/StringUtil.class.php @@ -535,13 +535,6 @@ final class StringUtil */ public static function convertEncoding($inCharset, $outCharset, $string) { - if ($inCharset == 'ISO-8859-1' && $outCharset == 'UTF-8') { - return \utf8_encode($string); - } - if ($inCharset == 'UTF-8' && $outCharset == 'ISO-8859-1') { - return \utf8_decode($string); - } - return \mb_convert_encoding($string, $outCharset, $inCharset); }