Is there a utf8 bug with mysql_fetch_array()
Posted: Sun Feb 04, 2007 9:30 pm
I am using MySQL 4.1.22. and PHP 4.4.4.
Now, when I add the following 2 lines of code, mysql_query() works perfectly with utf8 charset:
mysql_query("SET CHARACTER SET utf8", $db);
mysql_query("SET NAMES 'utf8'", $db);
However, results for mysql_fetch_array() appears like (????????).
I'd search google for a solution but was unable to find one. If it is really a bug with mysql_fetch_array(), how can I rewrite mysql_fetch_array() to use mysql_query() instead?
Now, when I add the following 2 lines of code, mysql_query() works perfectly with utf8 charset:
mysql_query("SET CHARACTER SET utf8", $db);
mysql_query("SET NAMES 'utf8'", $db);
However, results for mysql_fetch_array() appears like (????????).
I'd search google for a solution but was unable to find one. If it is really a bug with mysql_fetch_array(), how can I rewrite mysql_fetch_array() to use mysql_query() instead?