G
G
gomerIT2020-10-01 20:25:47
MySQL
gomerIT, 2020-10-01 20:25:47

How to solve the problem with the encoding of the database and the Site?

The coding in a DB costs windows-1251 it cannot be changed in any way. The site works with utf-8 encoding. I use PDO to connect to the database, I use utf-8 for the connection. The problem is that Russian characters from the site are stored in the database as hieroglyphs, but the output is in Russian characters. Can this be resolved?
PS I tested on other web hostings where the database is utf-8 encoded, everything is loaded and displayed normally there

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question