Answer the question
In order to leave comments, you need to log in
Why are question marks written in mysql instead of cyrillic?
I've already tried everything, but anyway, instead of Russian letters, this
???‚???‹?„?????‹?„?????‹?„????
I understand that the matter is in the encoding, but nothing can be done.
Here is the table
In the script it is
mysqli_query($this->con, "SET NAMES 'cp1251'");
mysqli_query($this->con, "SET CHARACTER SET 'cp1251'");
Answer the question
In order to leave comments, you need to log in
Through SET NAMES, you specify what encoding "possesses" the data passed to MySQL.
If your site shows (and therefore accepts) data in CP1251 encoding, then yes, such SET NAMES is justified.
If the pages on the site are in UTF-8, then you are lying to MySQL that you have data in CP1251, because they are in UTF-8.
PS That you have a website in CP866 or in KOI-8, I won’t even assume ...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question