MySQL Forums
Forum List  »  Newbie

Re: UTF-8 problem
Posted by: Jeremy Varnham
Date: November 01, 2009 08:17AM

I too have wasted fruitless hours with this...

For me, as one of Rick's suggestions, the solution was to add a "SET NAMES" line when connecting to the database, like this:

mysql_connect ($dbhost, $dbusername, $dbuserpass) or die(mysql_error());
mysql_query("SET NAMES 'utf8'");
mysql_select_db ($dbname);

Options: ReplyQuote

Written By
October 27, 2009 04:24PM
October 31, 2009 11:04AM
Re: UTF-8 problem
November 01, 2009 08:17AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.