| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 |
Serendipity MySQL 4.1 tweaks
well we just discovered yesterday that our blogs aren’t working for chinese characters! this is a big problem… and it
was due to our system setups… i spent today almost 7 hours to find out what was the problem and to fix it…
finally, just insert the following 2 lines in include/db/mysql.inc.php
mysql_query(’SET NAMES gb2312;’, $serendipity[’dbConn’]);
mysql_query(’SET collation_connection = \’gb2312_chinese_ci\’;', $serendipity[’dbConn’]);
Fixing FlashCom’s onDisconnect problem…
yes… this buggy server software is dumb to detect that the client is dead, and thus holding ghost connections.
developers are required to handle this problem by code for now… below is what i hunted down from the flashcom mailing
list:
Sometimes it takes a while for the server to understand that the client disconnected. That’s because the
operating system holds on to the socket for a while. Macs, for instance, take much longer than windows before they
decide a connection is lost. This might take a minute, maybe even longer.
If that’s too long for you, one thing you can do to make sure that a client is alive is to make a server-to-client call
to the client on a setInterval (maybe once every 10 seconds?), like this:
FlashChat MySQL 4.1 tweaks
got a tip from the forum… inserted the following lines to inc/classes/db.php
however, i am still to figure out how to make chinese logins work as wellmysql_query(”SET NAMES utf8″,$conn);
mysql_query(”SET CHARACTER_SET_CLIENT=utf8″,$conn);
mysql_query(”SET CHARACTER_SET_RESULTS=utf8″,$conn);
Chinese nicknames in FlashChat
commented out a few lines that have
utf8_encode
utf8_decode
WordPress tweaks for MySQL 4.1+ to support different languages
to add support to MySQL 4.1 database with language not set to UTF-8, one must add the following to the wp-includes/wp-db.php file, in function wpdb, at the end:
@mysql_query(’SET NAMES gb2312;’, $this->dbh);
@mysql_query(’SET collation_connection = \’gb2312_chinese_ci\’;', $this->dbh);
Replace “gb2312″ and “gb2312_chinese_ci” to your appropriate settings.

Recent comments