OJS3.2.0-3 connection_charset = utf8 does not display special characters right


When upgrading OJS 3.1.1-4 to 3.2.0-3 we have to change ‘connection_charset’ from ‘Off’ to ‘utf8’
But when doing this, the special characters are not displayed right. It seems that the data is latin1 while the table-collation is utf8_general_ci or utf_unicode_ci.
I also tried to convert the data to utf8 but this doesn’t work for all the tables.
Do you have a solution for this?

(I couldn’t find a utf8-topic that solved our problem)

Hi @ugp2,

I’ve encountered similar problem. There is a discussion and proposed solution in this thread: Errors on install/after upgrade of OJS instance with Ukrainian locale · Issue #5580 · pkp/pkp-lib · GitHub

Unfortunately is this not the solution for our problem. The installation of OJS 3.2.0-3 didn’t cause a problem. Afterwards we discovered that OJS 3.2.0-3 requires ‘connection_charset = utf8’. When we set so we get the not wanted characters. Even conversion of the data did not work.

This question isn’t specific to OJS and goes beyond my knowledge.

From what I see from the MySQL documentation, if character set isn’t specified and collation is, then associated character set will be used. I’ve just tested it and with collation utf8_general_ci by default utf8 character is used, so I don’t know why in your case it’s latin1. Do you remember how the database was created?

Secondly, according to the SO answer, database charset ca be converted but this technique works only if the text was stored in one charset.

for now I convert the field setting_value in the following tables: journal_settings , announcement_settings , navigation_menu_item_settings ,publication_settings , author_settings

with the following command:
UPDATE table_name SET setting_value = CONVERT(CAST(CONVERT(setting_value USING latin1) as BINARY) USING utf8);

this had solved our problem so far…