-
Notifications
You must be signed in to change notification settings - Fork 119
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
[BUG] utf8_encode()
has been deprecated.
#988
Comments
Given the Instead of the current if (mb_detect_encoding($contents) != 'UTF-8') {
$contents = utf8_encode($contents);
} Something like: $detected_encoding = mb_detect_encoding($contents);
if ($detected_encoding != 'UTF-8') {
$contents = mb_convert_encoding($contents, 'UTF-8', $detected_encoding);
} ? Also, revisiting Drupal's requirements proper, it requires |
fixed as part of #987 |
PHP Note: https://php.watch/versions/8.2/utf8_encode-utf8_decode-deprecated
What steps does it take to reproduce the issue?
Caught by CI.
When does this issue occur?
When running CI on PHP 8.2.
Where does it occur?
https://github.com/Islandora/islandora/blob/2.x/modules/islandora_text_extraction/src/Plugin/Field/FieldFormatter/OcrTextFormatter.php#L135-L137
Resolution
mbstring
,iconv
andintl
are suggested as replacements, but I don't know enough to suggest which one (or combination) to use, or whether we have access to these extensions in the default deployment.The text was updated successfully, but these errors were encountered: