I restored backup to OJS 2.4.8.5. Now I see mix collation which I changed to
utf8mb4_general_ci
I changed type of some tables from myISAM to InnoDB. Now all tables are utf8mb4_general_ci and InnoDB.
In OJS 2.4.8.5 when I change connection_charset = off to connection_charset = utf8 it show the same error (some words are changed like “Côte d’Ivoire” is changed to Côte d’Ivoire) but when I change it to connection_charset = utf-8 it show no error.
The issue is I want to upgrade to the latest version one by one it do not show error from 2.8.45 to 3.1 and 3.2 but later when I want to upgrade 3.2 to 3.3, it requires utf8 (same error exist). It do not proceed with upgrading from 3.2 to 3.3 using utf-8.
I suspect the content is garbled in the database. In old versions of MySQL, the default character set for a new database was Latin1; I’ve encountered many installs where the database was configured this way, but OJS was configured for UTF8. This led to data that could be stored and retrieved by OJS without trouble, as the same misconfiguration was applied both on data insertion and retrieval, but would be incorrectly encoded in the database.
At a later point, the default MySQL character set was changed to UTF8. Dropping the old (Latin1) database, creating a new (UTF-8) one, and inserting the data into MySQL would further garble the encodings – but now, because MySQL and OJS agree that both use UTF-8, the invalid data becomes visible.
If this is what happened to you, you’ll need to re-encode the content of your database to get everything cleanly in UTF8.
You can verify whether your data is correctly stored by looking into the database using PHPMyAdmin or the command-line MySQL client. Check to see whether accents look correct.
There are a few other threads discussing this issue; search the forum e.g. for ftfy (a tool for unscrambling mixed encodings).
Regards,
Alec Smecher
Public Knowledge Project Team