Concrete 5-8.5.7 Special characters Special Characters displaying incorrectly on PHP version 7.4.27

The following polish character is showing as expected on PHP v7.4.27

Correct Polish character

Wspomóż Misjonarzy Werbistów!
Twoja ofiara pomoże naszym kapłanom i braciom zakonnym głosić Ewangelię w najdalszych zakątkach świata.

Incorrect display

Wspomóż Misjonarzy Werbistów!enter code here
Twoja ofiara pomoże naszym kapÅanom i braciom zakonnym gÅosiÄ EwangeliÄ w najdalszych zakÄtkach Åwiata.

This text is added on the global area. When we tried to debug the issue the text was displaying correctly when the user is logged in and if the page is opened when not logged in it was displaying the text incorrectly, which is very weird.

Also, one further review we downgraded the PHP version to 7.4.25 which fixed the issue.

Any help would be appreciated to determine the cause of this issue and possible fix.

Sounds like time-travel to 200X, when utf8 encoding weren’t as ubiquotus as today:D
Old days you could find polish databases encoded in latin-1, iso-8859 or windows-1250.

Check what encoding is used in table columns.
Check actual texts in database rows - those could be encoded wrong during database migration.
There is a chance you could just manually mass replace those gibberish signs with proper diacritical characters.

Hello @Parasek,

I checked the database table and found that the encoding is correct it’s set to utf8. Also, checked the content inside the database does not contain gibberish signs.

There might be a different reason of the cause to this issue. As changing the PHP version corrected the error which is weird and not sure why that happened. My guess is it could be something related to PHP

Do let me know if you need any more information on this.