Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utf8_en/decode deprecation #665

Open
amazeika opened this issue Sep 4, 2023 · 0 comments
Open

utf8_en/decode deprecation #665

amazeika opened this issue Sep 4, 2023 · 0 comments
Milestone

Comments

@amazeika
Copy link
Member

amazeika commented Sep 4, 2023

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.

@amazeika amazeika added this to the 4.1 milestone Nov 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant