Answer the question
In order to leave comments, you need to log in
Missing encodings in MySQL
In MySQL, the encodings have flown. At first, everything changed to latin1, then I, through the SET NAMES utf8 request, seemed to be rearranged to utf8. But when writing to the database from a web application in PHP, the Cyrillic alphabet is written in the form of kryakozyabr, which I have not seen before. I tried to insert the SET NAMES utf8 command in PHP before each request, the cracks changed to a set of question marks ???????. And what is most interesting, when outputting data from the database to the pages of the web application, question marks are also displayed, although with the first version of the kryakozyabr everything was output normally! What could be the problem?
Answer the question
In order to leave comments, you need to log in
Specify the encoding when connecting to the database:
$db = new mysqli('127.0.0.1', 'user', 'pass', 'db');
$db->set_charset('utf8');
AddDefaultCharset utf-8
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question