Re: Possible MySQLi extension BUG!. .

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Actually,

If you add the following line to my.cnf you'll get the same results, permanently

[mysql]
default-character-set=utf8

[mysqld]
default-character-set=utf8

The last statement should be added AFTER all other configs... if not, it will not work. In other works, add the line at the end of the [mysqld] section.

Patel, Aman wrote:

Renich Bon Ciric wrote:

Firs of all, I wanna say I have spent a whole week looking for answers elsewhere. The reason of this message is to look for a practical solution.


I just spent the last 2-3 days converting my entire database (and website) from charset latin1 (ISO-8859-1) to utf8. Although I used the mysql library instead of the mysqli library I believe this should help:

SET NAMES 'utf8';

Execute that query before you execute any other query that is going to use characters that are encoded in utf8. If you would like more information on what the above statement does here's the link to the mysql documentation:

http://dev.mysql.com/doc/mysql/en/charset-connection.html

- Aman




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux