D
D
David2016-02-28 22:12:29
PHP
David, 2016-02-28 22:12:29

Encoding. instant cms. Where do question marks come from?

Cyrillic is displayed incorrectly when outputting (????????).
The base encoding is utf_8_general_ci, .htaccess AddDefaultCharset utf-8.
Where else to look for an error?
(website works on instantcms 2)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
David, 2016-02-29
@MiragePresent

Found the problem. Maybe someone will come in handy. When declaring mysql pdo, it was necessary to set the encoding
$pdo = new PDO(
'mysql:host=mysql.example.com;dbname=example_db',
"username",
"password",
array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8 "));

U
Uwe_Boll, 2016-02-28
@Uwe_Boll

And the server gives what encoding?
What encoding are you saving the files in ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question