Answer the question
In order to leave comments, you need to log in
Encoding problem. What to do if the data from the database is displayed in the form of questions?
Good day. Data from the database is displayed in this form ?????? ? ????? ?429?????? ?
Through phpmyadmin it can be seen that the fields are in utf8_unicode_ci encoding, if you find out the encoding using mb_detect_encoding, it shows utf-8, files in utf-8 without BOM.
I tried everything:
- in HTML I registered
- and so I registered header('Content-Type: text/html; charset=utf-8');
- registered in .htaccess #AddDefaultCharset utf-8
- after connecting to the database, registered
mysql_query("SET NAMES utf8");
mysql_query("SET CHARACTER SET utf8");
mysql_query("SET character_set_client = utf8");
mysql_query("SET character_set_connection = utf8");
mysql_query("SET character_set_results = utf8");
but nothing helps. The data that is stored in the database is imported from AMO CPM, there are suspicions that they are in ASCII encoding. Is it possible to do something so that the Cyrillic alphabet is displayed normally?
Answer the question
In order to leave comments, you need to log in
Data encoded in ASCII arrives as utf-8.
Convert them:
or
mb_convert_encoding($datexta, "UTF-8", "Windows-1251");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question