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.