When IE browser form is submitted, Chinese transcoding is always invalid
phpcn_u9994
phpcn_u9994 2017-07-10 10:25:14
0
3
1443

1499653084528884.jpg

Ask the master.

This is the page where PHP submits the form. The receiver requires GBK encoding. The submitter's PHP and database are both in UTF-8 format. Therefore, the page is set up in the middle, and the encoding of the form is gbk.

After testing Google, Firefox, and the speed mode of domestic browsers, there is no problem, and the submitted name can be displayed normally.

Only IE browser and domestic browser's compatibility mode submission used to display garbled characters.

456.jpg

After packet capture, we found the following:

name=%E7%B4%A7%E7%8B%82%E7%A0%82

This piece of information is displayed in the packet capture. After verification, this is the transcoding in uft-8 mode. correct. But a problem arises. My page is in gbk. Why does the transcoding become utf-8 mode.

Now that I have finished describing the problem, I would like to ask the experts for help. Thanks

phpcn_u9994
phpcn_u9994

reply all(3)
phpcn_u9994

Resolved

Ty80
onsubmit="document.charset='gbk';"

I have never seen this kind of transcoding when submitting. The encoding should be processed on the receiving server side. Or the two codes are unified.

Ty80

Use

@iconv('utf-8','gbk',$str);

to try manual conversion coding, I wish you good luck.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template