Skip to content

Instantly share code, notes, and snippets.

@effkay
Created October 7, 2009 11:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save effkay/203997 to your computer and use it in GitHub Desktop.
Save effkay/203997 to your computer and use it in GitHub Desktop.
Just for everyone's information, if you want to run purely utf8, don't forget the following:
httpd.conf:
AddCharset UTF-8 .utf8
AddDefaultCharset UTF-8
php.ini
default_charset = "utf-8"
my.cnf
character-set-server=utf8
default-collation=utf8_unicode_ci
Then, if you're writing PHP scripts, soon after opening your connection to mysql, issue one of the following:
SET NAMES 'utf8';
OR, if you are running the mysqli extension:
mysqli_set_charset('utf8');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment