Russian characters are not added to the database.

Hello. There was such a problem. There is an addition of news by means of AJAX. It has a check when adding for the presence of characters. If the user tries to send an empty request, it will throw an error. So, when adding an entry in Latin letters, everything is added normally. And if with Russian characters, then empty news is added. What does it mean? I think the encoding is to blame for everything, but I have a website on utf-8, MySql database is also on utf-8. Please help.

Answer 1

Mr @Luntegg, don’t mislead people. utf8-general-ci is not an encoding.

@Nikolay Nikonov, application sources must be saved in utf-8 encoding. You say it is. Look in the my.ini file and specify the utf-8 encoding in the [mysqld] directive. How to do this is written for example here