Strange characters after uprading to 3.2.1.4 from 2.4.8.5

Hello Team.

I upgraded ojs to 3.2.1.4 from 2.4.8.5 and on the title’s articles i can see special characters instead of greek title. For example [???. 1 ]

My database has the following character_set and collation

mysql> SELECT @@character_set_database, @@collation_database;
±-------------------------±---------------------+
| @@character_set_database | @@collation_database |
±-------------------------±---------------------+
| utf8 | utf8_general_ci |
±-------------------------±---------------------+
1 row in set (0.00 sec)

On config.inc.php

egrep -i utf config.inc.php

;mysql_set_charset(“UTF8”, $db);
collation = utf8_general_ci
client_charset = utf-8
connection_charset = utf8
database_charset = utf8

Any help is much appreciated.

Regards
Kostas

Do you have different strange characters or just question marks?
if different strange characters:
I’ve had the similar problem.
With the help of this page UTF-8 Character Debug Tool I replaced the strange characters in the database file with the find-replace method via notepad++

thanks for your reply @kerimsarigul i have only question marks.

hello @koumoutsos , can you test this?

Please, do backup.

i tried this but i am getting error
mysql> CREATE DATABASE NewDani3214_utf8;
Query OK, 1 row affected (0.00 sec)

mysqldump -u root -p --opt --quote-names --skip-set-charset --default-character-set=latin1 NewDani3214 > NewDani3214_latin1.sql

mysql -u root -p --default-character-set=utf8 NewDani3214_utf8 < NewDani3214_latin1.sql
Enter password:
ERROR 1062 (23000) at line 3769: Duplicate entry ‘???’ for key 'submission_search_keyword_text

Hello @koumoutsos
Before mysqldump, can you do…

DELETE FROM `submission_search_keyword_list`
DELETE FROM `submission_search_objects`
DELETE FROM `submission_search_object_keywords`

?

Remember, do BACKUPS! :expressionless:

Thanks

i did it but not i lost encoding on all greeks.

backup
root@new-ojs-2019:~# mysqldump -u root -p NewDani3214 > NewDani3214_healthy_28Oct21
Enter password:
root@new-ojs-2019:~#

mysql> use NewDani3214;

mysql> DELETE FROM submission_search_keyword_list;
Query OK, 9399 rows affected (0.01 sec)

mysql> DELETE FROM submission_search_objects;
Query OK, 418166 rows affected (0.03 sec)

mysql> DELETE FROM submission_search_object_keywords;
Query OK, 136719 rows affected (0.00 sec)

mysql>

root@new-ojs-2019:~# mysqldump -u root -p --opt --quote-names --skip-set-charset --default-character-set=latin1 NewDani3214 > NewDani3214_latin1_try2.sql
Enter password:
root@new-ojs-2019:~#

mysql> CREATE DATABASE NewDani3214_utf8mb4_3 CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Query OK, 1 row affected (0.00 sec)

root@new-ojs-2019:~# mysql -u root -p --default-character-set=utf8 NewDani3214_utf8mb4_3 < NewDani3214_latin1_try2.sql
Enter password:
root@new-ojs-2019:~#

any other idea? Regards Kostas

on table publication_settings i have the following question marks

publication_id, locale, setting_name, setting_value

‘3’, ‘’, ‘language’, ‘en’
‘3’, ‘’, ‘pages’, ‘???. 19-20’

I tried to download this table and using sed to replace but after importing i am still getting ???.

Issue solved by following the below

I made a backup of the database of the successful installation of 2.4.8.5

#mysqldump -u root -p NewDani2485_17 > /root/NewDani2485_17_28_Oct.sql

Then i create a new database by setting character set to utf8

#mysql -u root -p
#mysql> CREATE DATABASE NewDani3214_utf8_2 CHARACTER SET utf8;

Import the database with default-character-set=utf8

mysql -u root -p --default-character-set=utf8 NewDani3214_utf8_2 < /root/NewDani2485_17_28_Oct.sql

Check encoding
mysql> use NewDani3214_utf8_2;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> SELECT @@character_set_database, @@collation_database;
±-------------------------±---------------------+
| @@character_set_database | @@collation_database |
±-------------------------±---------------------+
| utf8 | utf8_general_ci |
±-------------------------±---------------------+
1 row in set (0.00 sec)

mysql>

Then try to upgrade as per the normal process

Case can be closed

1 Like