Character encoding problem - PHP issue? MySQL

Wasn’t sure where to post this one, as I’m not sure whether the problem I’m getting is a PHP issue, a MySQL issue or Apache - or a bit of all three.

I am getting broken characters on a page I’m working on…

The page is set to utf-8 in the meta element.
It’s also set to utf-8 as a PHP header
The MySQL table is set to utf-8 too

Yet, somehow, I’m getting brokem characters. A few screenshots should help:

Charset in MySQL table:

As set in the HTML:

A country with accents, as showing in the DB:

How that country is coming through in the HTML:

I must have missed something. Probably really simple to sort, the question is what this is?

Thanks folks

When your connecting to the database, what charset are you using with
mysqli_set_charset() or the equiviland mysql_set_charset() for the connection between php and MySQL?

Sorry, forgot to add. The browser (Chrome) has encoding set to ‘Auto- Detect’, so there should be no conflict there.

This was exactly where the problem lay. Thanks for the advice, folks. Weirdly, I’ve never proactively set that and have also never come across the problem. Guess I’ve not had to deal with any odd characters in a DB before, then.


The setting in your browser maybe?