Database Collation vs. Encoding and non US characters

So I am confused. So many posts on this, but I can’t find anything conclusive.

We have Norwegian language journals, hence a lot of non US characters in our database. When importing the database as an sql dump while trying to upgrade, phpMyadmin asks me to specify file charset. This is set to utf8.

In the sql dump I see references to utf8mb4 for charset and utf8mb4_general_ci for collation.

I can’t set charset to utf8mb4 in phpmyamin import, just utf8.

Then after importing most of the tables are latin1_swedish_ci (collation). Shouldn’t every table be the same ?

Should I import it as utf8 and then convert all table and table column collations to utf8mb4_unicode_ci?

Client and connection charset is set to utf8 in config.inc

Any other place I need to set encoding?

Best regards
Geir

Hi @geirrosset,

Could you please indicate which version of OJS you’re using (e.g. 3.3.0-13)?

-Roger
PKP Team

We upgraded to 3.2.1.2 last February, and had huge problems with this.

When encoding is properly specified I assume I should see the correct characters when looking at the database in f.i. DbVisualizer? At the moment all non US characters are garbled, but they display correctly online. For instance Norwegian ‘ø’ (oslash) is displayed as ‘ø’ in the database, but in a browser it shows as ‘ø’. DbVisualizer says that the database is UTF-8, but in the collate column all but 4 tables are set to latin1_swedish_ci the remaining 4 are set to utf8mb3_general_ci. Should all these be utf8mb4_general_ci or utf8mb3_unicode_ci?

In that last sentence both should be utf8mb4 of course.