Pligg publication Article Chinese garbled code Solution
By clin003 at 20070816 from: http://clin003.com/or http://blog.csdn.net/clin003/
Version: linux2.6.9-22. elsmp + mysql4.1.12 + PHP version 4.4.4 + pligg beta 9.7
Add an article after modifying the description in Admin -- modify language. Some Chinese characters are displayed as garbled characters (Firefox is displayed as a question mark, ie is displayed as a box or blank ). Think of the last modification of webmagik garbled because of the dataset encoding.
So Google, eventually ran to the official website: http://forums.pligg.com/general-help/3153-help-chinese-display-problem.html
In File libs/DB. php:
I added the following just before
$ This-> select ($ dbname); (Beta 9.7 is roughly located in 196 rows)
$ Dbcharset = 'utf8 '; Mysql_query ("set character_set_connection = $ dbcharset, character_set_results = $ dbcharset, character_set_client = binary "); |
Then it works !!!
By clin003 at 20070816 from: http://clin003.com/or http://blog.csdn.net/clin003/
It is displayed normally.
Below is
Garbled characters
By clin003 at 20070816 from: http://clin003.com/or http://blog.csdn.net/clin003/
After modifying dB. php, add the document normally.
However, the previously added Chinese articles are indeed like this (it cannot be said that this is a pity, but it is mainly for me to compare dishes-I don't know PHP)