D
D
Denis99992015-11-12 18:43:21
PHP
Denis9999, 2015-11-12 18:43:21

Encoding in PHP and MySQL, why are question marks displayed?

I have data in Russian in the MySql database, which are displayed as question marks, I tried English, and even it came out like that.
PHP files encoding is utf-8, databases utf8_general_ci.
mb_internal_encoding("UTF-8") doesn't help, mysql_query('set names utf8') does too.
Why are question marks displayed?

Answer the question

In order to leave comments, you need to log in

6 answer(s)
D
Denis9999, 2015-11-13
@Denis9999

I rummaged through a bunch of articles, exhaustive manuals from people who got sick of similar questions on the forums, and nothing helped, even if you crack.
But I found a solution, you need to specify the necessary encoding in this line in the my.cnf (my.ini) file init-connect = "set names utf8"

I
Immortal_pony, 2015-11-12
@Immortal_pony

<meta charset=“utf-8”>

L
LittleFatNinja, 2015-11-12
@LittleFatNinja

google

M
Max, 2015-11-12
@MaxDukov

my favorite article
and what does it say in the MySQL console? Are there questions too?

M
MK, 2015-11-12
@Maxsior

maybe you have files in utf-8 with BOM?

R
Ruslan, 2015-11-12
@ruslan_aleev

Try to merge the .sql dump and recode it to utf8, also check all DEFAULT CHARSET=utf8 and check config.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question