Try sending a query
SET NAMES utf8;
Personally I solved the same problem by adding after the mysql connection code :
mysql_set_charset("utf8");
or:
mysqli_set_charset("utf8");
or the equivalent in POO :
$mysqli_link->set_charset("utf8");
And sometimes you’ll have to define the main charset of php adding this code :
mb_internal_encoding('UTF-8');
On the HTML client side you have to add the following header data :
<meta http-equiv="Content-type" content="text/html;charset=utf-8" />
To use the JSON AJAX results (for example, using jQuery), you must set the header by adding :
header("Content-type: application/json;charset=utf8");
json_encode(
some_data
);
That should solve
Thanks for the tips, they are useful so much that I had already applied them, the problem then was not that neither the BD’s collation, and yes of how I performed the query, it was through REGEXP, soon Summer and Summer would be different indeed, there I used the comparison with equality, something like WHERE x = 'Verao' and returned Summer and Summer records, as I expected. Grateful for the reply @Renatotavares
– Ale