Text-Statistics
Text-Statistics copied to clipboard
Fix PHP 8.2 deprecations
Because of the misleading function names, lack of error messages and warnings, and the lack of support for character encodings other than ISO-8859-1, utf8_encode and utf8_decode functions are deprecated in PHP 8.2.
This is being used in \DaveChild\TextStatistics\Text::cleanText()
We can replace it with the code below, or maybe see if we can remove it?
$strText = mb_convert_encoding($strText, 'ISO-8859-1', mb_detect_encoding($strText));
I see there already is a PR for this: https://github.com/DaveChild/Text-Statistics/pull/56 (and more 8.2 deprecations).