Problem/Motivation

Deprecated function: Function utf8_decode() is deprecated since 8.2, visit the php.net documentation for various alternatives in imagefieldintextifnone_strpos_nth() (line 171 of /home/vhfa_test/site/web/modules/contrib/imagefieldintextifnone/imagefieldintextifnone.module)

Steps to reproduce

Proposed resolution

mb_convert_encoding($utf8_string, 'ISO-8859-1', 'UTF-8'); looks like the most straightforward fix. Provides same locations as utf8_decode did for character starts testing with ç and 😵‍💫 etc in a string.

Possibly we should be reading the ISO type from the text we are getting?

Remaining tasks

User interface changes

API changes

Data model changes

Comments

mlncn created an issue. See original summary.

mlncn’s picture

mlncn’s picture

Status: Active » Needs review

  • mlncn committed 5bffa67d on 1.0.x
    feat: #3583035 Replace deprecated utf8_decode function
    
    By: mlncn