R
R
rukzen2019-01-31 23:40:17
CMS
rukzen, 2019-01-31 23:40:17

How to change the display of question marks instead of Cyrillic?

Good day.
The site worked on utf-8 encoding and everything was fine, I decided to transfer the database to utf8mb4 now to utf8mb4, but the site displays question marks, although everything is displayed normally in the database itself.
Csm dle Problem
solved
Thanks to everyone who answered such a stupid question.
Only thanks to you, excluding everything that is not correct, by the method of futile attempts, I found one solution.
The problem was solved by "forcibly" changing the utf8_general_ci encoding for one of the columns and then changing everything back to utf8mb4_general_ci in PhpMyAdmin
More (Maybe something is superfluous here, I will list only the list of my actions)
PS I have an ISPmanager site control panel.
Updated PHP from 5.5 to 7
Updated MySQL
Executed a SQL query in PhpMyAdmin facing the database to the dle_post table

ALTER TABLE `db_name`.`table_name` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

Where:
db_name is the name of the database
table_name is the name of the table (dle_post)
Then returned the table back to utf8bit4
ALTER TABLE `db_name`.`table_name` CONVERT TO CHARACTER SET utf8 COLLATE utf8bit4_general_ci;

Now utf8mb4 is displayed on the site.
"Checked with emoji"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
ivankomolin, 2019-02-01
@ivankomolin

You can execute the following query in the application after connecting to the database
set names utf8mb4

T
ThunderCat, 2019-02-01
@ThunderCat

After connecting, there should be requests

SET character_set_connection = utf8mb4
SET character_set_client = utf8mb4
SET character_set_results = utf8mb4

otherwise, the client does not know in what encoding the data is received from the database.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question