I'm using ajax to get my results from my query. The ajax gives the response (sql query executes successfully) but some characters (croatian language) are broken, hence utf-8 doesn't function correctly.
In my php script, I've tried the following:
$con->set_charset('utf8');
OR
$con->query("SET NAMES 'utf8'");
I've also added the following line in the header:
header('Content-Type: text/html; charset=utf-8');
as well as the content type in my client-ajax code:
contentType: "application/json; charset=utf-8"
Still my characters break, I'm not getting utf-8 valid response. In phpMyAdmin I've got the utf8_general_ci collation which I believe is ok.