Version: 2.19Updated: 07.12.2023ModificationsVisitors: 1425989ImprintFeedbackLiabilityDonation (CHF 10)Created by PFS
Tipps und Tricks rund um den Computertipps_und_tricks_computer
Tips and tricks for your computer
Translate with Google
2023-02-24  PHP 8: utf8_decode und utf8_encode sind DEPRECATED (veraltet) - wie ersetzen? 

Problem:
In PHP 8 werden utf8_decode und utf8_encode als DEPRECATED (veraltet) angegeben. Wie ersetzen?

 
Lösung:
Die beiden Funktionen kann man wie folgt ersetzen:

utf8_decode durch mb_convert_encoding($s, 'ISO-8859-1', 'UTF-8')
utf8_encode durch mb_convert_encoding($s, 'UTF-8', 'ISO-8859-1')

 
Weitere Infos:
php.net/manual utf8-decode
php.net/manual utf8-encode
Translate with Google
Link to this page


Advertisement:
 
Advertisement:
Giveaway of the Day
O&O Software -