MySQL support for UTF-8 in PHP

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")

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.