Sunday, March 2, 2008

UFT-8 on a website based on mySQL and PHP

This post has been moved to http://blog.krisgielen.be/archives/51.

2 comments:

Maike Utrera said...

I had a simular issue using a webservice call that returned a XML file with SQL data. The only way to solve this was to set the charset to ISO 8859-1.
I hope this works you.

Kris Gielen said...

Maike,
Thanks for your comments. That would indeed have been a simpler solution (once you know it :-)) if you have to deal with Western European characters only. In my case, I needed Bulgarian characters (like добър прием) and they are not available in ISO 8859-1. So I was forced to stick with utf-8, but then you need to use the rather obscure "SET NAMES utf8" setting in mysql. See http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html for details.
Kris