I have PHP script with UTF-8 encoding and database and tables in db with UTF8 encoding too (utf8_general_ci). But after build and exec mysqli query this strings are going to a wrong encoding and they looks like (in db) they need UTF-8 converting, so they're encoded to CP1252 or something like that. (I putting up a cyrillic strings).
code that I using to connect to db is here:
$db = new mysqli("localhost", "root", "", "nf");
$db->set_charset("utf8");
so as you see charset setted up is to utf8, and database are in utf-8 and tables too.
so IDK why and where strings are going to a wrong character set like they're converted to a CP1252 encoding for no reason.
What may reason to do this? what additional information I can provide?