Encoding issue after upgraded OJS 2.4.8.4 to 3.2.1.4

OJS 3.2.1.4

I am getting the following output ;
“A dream doesn’t become reality through magic; it takes sweat, determination and hard work.†―

there was no issues and changes made to the config during the upgrade the ojs 2.4.8.4 looked like this:

“A dream doesn’t become reality through magic; it takes sweat, determination and hard work.” ― Colin Powel

the config.inc.php was not changed and looks like this :slight_smile:

;;;;;;;;;;;;;;;;;;;;;;;;;
; Localization Settings ;
;;;;;;;;;;;;;;;;;;;;;;;;;

[i18n]

; Default locale
locale = en_ZA

; Client output/input character set
client_charset = utf-8

; Database connection character set
; Must be set to “Off” if not supported by the database server
; If enabled, must be the same character set as “client_charset”
; (although the actual name may differ slightly depending on the server)
connection_charset = utf8

; Database storage character set
; Must be set to “Off” if not supported by the database server
database_charset = Off


when i read up on the forums and checked mysql with the following commands looks as follows:

mysql> SELECT @@character_set_database, @@collation_database;
±-------------------------±---------------------+
| @@character_set_database | @@collation_database |
±-------------------------±---------------------+
| utf8mb4 | utf8mb4_0900_ai_ci |
±-------------------------±---------------------+

Thank you for your assistance

Some additional info :slight_smile:
SHOW VARIABLES WHERE Variable_name LIKE ‘character_set_%’ OR Variable_name LIKE ‘collation%’
→ ;
±-------------------------±-------------------+
| Variable_name | Value |
±-------------------------±-------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8mb3 |
| collation_connection | utf8mb4_0900_ai_ci |
| collation_database | utf8mb4_0900_ai_ci |
| collation_server | utf8mb4_0900_ai_ci |
±-------------------------±-------------------+

Fixed it using the below

CREATE DATABASE `databasename` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;  
mysqldump -u root -p databasename--no-data --skip-set-charset --default-character-set=latin1 \
| sed 's/CHARSET=latin1/CHARSET=utf8mb4/g' \
> schema.sql

mysqldump -u root -p databasename--no-create-db --no-create-info --skip-set-charset --default-character-set=latin1 > data.sql
mysql -u root -p databasename

–default-character-set=utf8mb4

source schema.sql;
source data.sql;

client_charset = utf-8

connection_charset = utf8

database_charset = utf8

charset_normalization = Off

2 Likes

This topic was automatically closed after 4 days. New replies are no longer allowed.