Home > Backend Development > PHP Tutorial > Solution to the problem that IE6 will cause garbled characters when sending an odd number of Chinese character requests through get_PHP Tutorial

Solution to the problem that IE6 will cause garbled characters when sending an odd number of Chinese character requests through get_PHP Tutorial

WBOY
Release: 2016-07-13 10:31:29
Original
1002 people have browsed it

When I recently wrote a program in PHP (UTF8 encoding), I found that when sending an odd number of Chinese characters to the server using http get, garbled characters would appear. At first I thought there was something wrong with the PHP program or service configuration, but after a long inspection I found out No, I searched on Google and saw that some people said that IE6 has compatibility issues. IE7, IE8, FIREFOX, and CHROME do not have this problem.

The solution to this problem is very simple. Just use urlencode encoding to process it. Note that if you use parameters passed by javascript, you use the encodeURI function. In fact, this should be a matter of habit. Urlencoding all parameters passed by get will make the program more robust, more compatible, and more portable.

Articles you may be interested in

  • A simple example of PHP obtaining web content through socket
  • Universal PHP filter function code to prevent injection vulnerability attacks
  • js restricts the text box to only input numbers (including decimal point numbers)
  • The difference between adding the static keyword before variables and functions in php
  • div css book tutorial recommended "Mastering CSS" +DIV web page style and layout supporting video tutorial》
  • PHP function to convert Arabic numerals into Chinese characters
  • Usage of MySQL replace function to replace string statements
  • Due to its configuration information The hardware device (in the registry) is incomplete or corrupted and Windows cannot start this hardware device. (Code 19) Solution

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/764070.htmlTechArticleRecently when writing a program (UTF8 encoding) in php, I found that when sending an odd number of Chinese characters to the server using http get method Garbled characters will appear. At first I thought there was a problem with the PHP program or service configuration, but later I checked...
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template