MySQL encoding configuration

Today I was working on a CakePHP 2.1 project and when I was doing:

my result was coming with encoding errors.

As usual, I went to check de header layout, to be sure that I used UTF-8:

Then I checked the core.php to be sure it was defined with UTF-8:

Also checked the database connection at database.php to be sure it was using UTF-8:

Everything was ok on all files. What could it be then? The only possible reason was MySQL not being configured with utf-8 on table and fields…

Continue reading “MySQL encoding configuration”