SMF 2.0.19 - Unreadable characters in the database after moving to a new hosting

Started by sokoban, January 11, 2024, 07:05:31 AM

Previous topic - Next topic

sokoban

Hello all,
After restoring to version 2.0.19 on a new server hosting, the database shows unreadable characters, but they should be in Cyrillic. This only appears in the sections and posts, but the system texts of the forum itself are in Cyrillic. I am attaching a screenshot to make it clear
I would be very grateful for any help



Kindred

Look in your database...

Are the characters in the smf_posts table, body column correct or are they a scrambled?

HOW did you "restore ... on a new server"

What is the language setting? (Iso or utf8?)
What is the database collation?


The system text is correct, because the system text is system... the post content is in your database -- and something is wrong there..
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

sokoban

Hello @Kindred
Thank you for your answer.
On the database when I look in phpmyadmin text is scrambled
Restore procedure is the same as https://wiki.simplemachines.org/smf/Backup. This backup is already restored last year(2023) without these problems... :(
The language settings is utf8
Database collation  => utf8mb3_general_ci

If there is any questions that help to understand the issue I will answer

Kindred

Database collation  => utf8mb3_general_ci

I suspect that is your problem  - 2.0.19 does not use that collation.  By restoring a 2.0.19 backup into a database with the wrong collation, the contents got scrambled.

Please restore the database using the SAME settings as the old database.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Quote from: Kindred on January 11, 2024, 11:57:36 AM2.0.19 does not use that collation. 

utf8mb3_general_ci is the current (correct) name for utf8_general_ci which isn't and hasn't ever been proper UTF-8 compliant.

Kindred

wow, I'm all sorts of wrong in the databases these days.  I thought that 2.0.x was still using latin1


Since I was incorrect about the collation, @sokoban --  please check your database export/import were the contents of the file screwed up even in there?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Quote from: Kindred on January 11, 2024, 02:06:35 PMI thought that 2.0.x was still using latin1

Only if you install in ISO mode; if you install in UTF-8, it'll use utf8mb3_general_ci.

Advertisement: