Character encoding problem after changing from PHP 5.6 to PHP 7

Avatar
  • Answered
After changing PHP version on my site diginytt.no from 5.6 to 7.0.23, I get broken special characters (Norwegian letters æøå) in both title and excerpt when importing posts to my MYSQL database from other sites/RSS feeds. When diginytt.no is running 5.6 I have no issues.

Look at this image from the front page of diginytt.no:
http://hesselberg.us/chars.jpg

To the left: This is how it looks when importing a post where diginytt.no has PHP7 activated.
To the right: This is how it looks when importing a post where diginytt.no has PHP5 (with correct character å).

How can I fix this? I want to upgrade my diginytt.no site to PHP7, but the characters must be shown correctly while importing feeds…
Avatar
Arn
Hello A_Hesselberg, Sorry for the issues with character encoding in your MySQL database after upgrading to PHP 7.x. This issue can be the result of several possible issues. In researching the problem, I found this forum post that does a good job of describing the efforts to correct the problem. If you are not familiar with updating the database's character encoding, then you may need to speak with an experienced developer/database programmer in order to have the issue corrected. If you have any further questions, please let us know. Kindest regards, Arnel C.