How to Fix wrong characters (charset) on mysql and php query results!
One of these days, I was doing a job for one parent me.
His site is a simple database with portuguese words and what I only had to do was a query and display the results.
But when the results came, the results that had accentuation or special characters all come wrong.
So looking in the internet, and chatting we have two main answers for this question:
1- use collate with convert and do some voodoo magic
2- Use the utf8 and fix all.
You have to understand two things.
The mysql usually works by default with the utf8 encoding.
With you are doing a query and showing it on a web page, your web page has to use the same charset (Utf8).
on your page you must have something like this to use the utf8
” ….meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″





