Solution for IE6 to garbled characters when sending an odd Chinese Character request via get

Source: Internet
Author: User

Recently I used php to write a program (UTF8 encoding) and found that garbled characters may occur when sending an odd number of Chinese characters to the server in http get mode. At first I thought there was a problem with the PHP program or service configuration, later I checked for half a day and found no. I found in google that some people said that IE6 had compatibility problems, and IE7, IE8, FIREFOX, and CHROME didn't have this problem.

The solution to this problem is simple. Simply use urlencode encoding for processing. Note that if javascript is used to pass parameters, the encodeURI function is used. In fact, this should be a habit. urlencode processing is performed on all get parameters, which makes the program more robust, compatible, and portable.

Articles you may be interested in
  • Simple Example of php getting webpage content through socket
  • Common PHP anti-injection vulnerability filtering function code
  • Javascript restricts that only numbers (including decimal places) can be entered in the text box)
  • Differences between variables and functions in php after the static keyword is added
  • Div css book tutorials recommend "professional CSS + DIV webpage style and layout video tutorials"
  • PHP functions for converting Arabic numerals into Chinese Characters
  • MySQL replace function replacement string statement usage
  • Windows cannot start the hardware device because its configuration information (in the Registry) is incomplete or damaged. (Code 19) Solution

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.