Flash + amfphp + MySQL display Chinese Solution

Source: Internet
Author: User

MySQL section:

The character set of the data table and field does not seem to affect the data. Whether I select utf8 or gb2312, the data will be displayed normally.

 

PHP section:

After mysql_connect, add the following sentence:

Mysql_query ("set names 'utf8 '");

In the gateway. php file under the amfphp directory, Set

$ Gateway-> setcharsethandler ("iconv", "uft-8", "uft-8 ");

 

After the preceding settings, you can use flash to enter and display Chinese characters.

 

However, using phpMyAdmin to input data has an impact, as shown in the following figure:

Both phpMyAdmin and PHP pages are normal. They are displayed in Flash ???,

If you set the database connection to gb2312, It is garbled.

Therefore, we recommend that you directly use flash to modify Chinese characters in the database.

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.