UTF-8-encoded program POST data to a GBK-encoded program to receive, what should I do

Source: Internet
Author: User
UTF-8-encoded program POST data to a GBK-encoded program to receive, what should be done? My system is developed by UTF-8 coding, and now there is data to be transmitted between a business and another business, now I want to POST data to the other party from my side, the encoding on the other side is GBK. how can I handle the POST data? UTF-8-encoded program POST data to a GBK-encoded program to receive, what should be done?
My system is developed by UTF-8 coding, and now there is data to be transmitted between a business and another business, now I want to POST data to the other party from my side, the encoding on the other side is GBK. how can I handle the POST data?
Share:
------ Solution --------------------
Convert data into gbk
If you want to, ask the other party to adapt to you.
------ Solution --------------------
Either change your POST page to gb2312 format. Either ask the recipient to perform transcoding when receiving your UTF-8 data. The transcoding function is as follows:
Iconv ("UTF-8", "GB2312", $ _ POST [aaa])
// Convert the encoding format of the variable $ _ POST [aaa] to UTF-8.

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.