I have a question about the setting of charset (encoding) for DB. The fields in DB has correct UTF-8 General CI encoding but still non-latin characters are corrupted.
Please, let me know if it’s possible to set the charset somehow through the code?
Also check the DEFAULT CHARSET and COLLATE settings of your database, all tables and all varchar fields. Don’t use the browser and json_encode for debugging. Try xdebug. Store the resultset into a text file and check the encoding. Use var_dump or print_r instead of json_encode.