Skip to content

utf8_en/decode deprecation #665

Open
@amazeika

Description

@amazeika

These two functions are deprecated on PHP 8.2 and going to be removed on PHP 9.

We need to replace these.

Solution

Encode

mb_convert_encoding($string, "UTF-8", mb_detect_encoding($string))

Decode

mb_convert_encoding($string, "ISO-8859-1", "UTF-8")

source: https://stackoverflow.com/questions/74865684/php-utf8-en-decode-deprecated-what-can-i-use

Implementation

Make use of https://github.com/joomlatools/joomlatools-framework/blob/master/code/libraries/joomlatools/library/legacy.php for re-defining the functions when removed.

Support tickets

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions