Answer the question
In order to leave comments, you need to log in
Why, after transferring the site to another hosting, the data from the database is displayed in rhombuses?
Hello. Uploaded site files and MySQL database to hosting. On another free hosting, everything was displayed correctly, but after transferring to another paid hosting, the data that is loaded from the database and displayed on the screen is displayed as black diamonds with a question (Only Russian characters). Page encoding UTF-8, Database tables encoding - utf8_unicode_ci. Tell me, what is the problem and how to fix it?
Answer the question
In order to leave comments, you need to log in
Check the encoding of the database connection and the encoding of the data inside the tables.
/etc/my.cnf file:
[client]
default-character-set = utf8
[mysqld]
init_connect='SET collation_connection = utf8_unicode_ci'
init_connect='SET NAMES utf8'
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question