MySQL support for UTF-8 in PHP

December 10th, 2007 | by David |

Originally published in Swedish in my Folkmun.se Blog, a handy tip to make sure that you are reading and writing UTF-8 when connecting to a MySQL database:

mysql_query("SET NAMES utf8");
mysql_query("SET CHARACTER SET utf8")

Post a Comment