From 19dadec9e9e337c4636f522da356ce461321a3ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 13 May 2022 10:49:52 +0200 Subject: [PATCH] Remove use of `utf8_encode` / `utf8_decode` These functions will be deprecated with PHP 8.2. --- wcfsetup/install/files/lib/util/StringUtil.class.php | 7 ------- 1 file changed, 7 deletions(-) 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); } -- 2.20.1