G
G
Governor2017-02-02 18:08:07
PHP
Governor, 2017-02-02 18:08:07

How to output Cyrillic from MySQL via PHP?

When I take out the Cyrillic alphabet from the database, it displays kryakozyabry.
In php immediately after I tried to write the following:
mysqli_query($sql, "SET NAMES 'utf8'");
mysqli_query($sql, "SET CHARACTER SET 'utf8'");
Does not help.
Everywhere there is UTF-8 encoding.
This is how the word User displays: Џ®«m§®ў vҐ«m
In the console it is displayed normally, crackling when output to the browser.
What could be the problem?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
I
Ivan, 2017-02-02
@LiguidCool

Check in what encoding the bracelet sees the page and in what file the file is saved.

A
alex stephen, 2017-02-02
@berezuev

To <head>add<meta charset="UTF-8">

T
ThunderCat, 2017-02-03
@ThunderCat

php ini configure:
default_charset="utf-8"

S
Stanislav Shendakov, 2017-02-03
@shindax

If with little blood, then through iconv you can try.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question