M
M
miniven2016-03-25 14:26:09
HTML
miniven, 2016-03-25 14:26:09

Why is there an encoding problem?

I have a simple php site. The encoding in the database is set to utf8-general-ci
The page is set to:
<meta charset="UTF-8">
All static Russian text is displayed normally. Everything that came from the database has the form "???????". How to fix it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
miniven, 2016-03-25
@miniven

Solved a problem. Added charset=utf8 encoding to PDO;

K
khipster, 2016-03-25
@khipster

header('Content-type: text/html; charset=utf-8');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question