end ur charset encoding nightmare in 2 lines!
Posted: Sat Jun 04, 2005 9:19 am
well, if u happen to install s9y 0.8.1 on a system such that u are using a different charset on all the system setups, say, gb2312 for web server, php, mysql, etc...
then u probably encountered the same problem i had... with s9y, such that posts became "????"
all u have to do... is not to change ur present setup... that is... such as gb2312 as collation for mysql, for php output encoding, etc...
all u have to do is this, find the mysql.inc.php (or whichever other database u use) under include/db
in the serendipity_db_connect() function, stick the following 2 lines before the end:
i dont know what exactly is the problem, but here is the solution... Don't Panic!
then u probably encountered the same problem i had... with s9y, such that posts became "????"
all u have to do... is not to change ur present setup... that is... such as gb2312 as collation for mysql, for php output encoding, etc...
all u have to do is this, find the mysql.inc.php (or whichever other database u use) under include/db
in the serendipity_db_connect() function, stick the following 2 lines before the end:
Code: Select all
mysql_query('SET NAMES gb2312;', $serendipity['dbConn']);
mysql_query('SET collation_connection = \'gb2312_chinese_ci\';', $serendipity['dbConn']);i dont know what exactly is the problem, but here is the solution... Don't Panic!