Pligg posts Chinese garbled Solutions

Source: Internet
Author: User
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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.