Created
August 6, 2012 01:27
-
-
Save fabiancarlos/3268851 to your computer and use it in GitHub Desktop.
Force charset utf8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
mysql_connect("$hostname_config", "$username_config", "$password_config") or die(mysql_error()); | |
$db = mysql_select_db("$database_config") or die(mysql_error()); | |
mysql_query("SET NAMES 'utf8'"); | |
mysql_query('SET character_set_connection=utf8'); | |
mysql_query('SET character_set_client=utf8'); | |
mysql_query('SET character_set_results=utf8'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment