finally fixed character problem

I’ve finally got round to fixing the issue I had with the character encoding on my photo pages. Whereever “M√ľnchen” was printed, what actually appeared on the page was a question mark on black diamond rather than the u umlaut.

After bit of messing around I fixed the problem – turned out to be to do with the connection between PHP and MySQL, all I needed to do was add the command:
mysql_query(“SET NAMES utf8”);
before I did the query to extract from the database.

Previously I was looking as issues with the character encoding in the header, meta tags etc and couldn’t find anything wrong with these. Though not entirely sure exactly what this SET NAMES command actually does – will need to go & ook it up ….

Leave a Reply