About the problem of the PHP get method passing Chinese parameter display garbled
Source: Internet
Author: User
About PHP Get method passing Chinese parameter display garbled problem
Problem Overview: With the Get method to pass parameters, parameters with Chinese, the submission page after the parameter values are displayed garbled, page encoding is UTF-8.
Detailed Description:
1. The same code, the native test Chinese can be displayed normally, but the server is not;
2. For PHP Chinese parameter transfer garbled problem resolution, online search method: Iconv and Mb_convert_encoding have tried, both are invalid (note: This machine Chinese display normal can not pass any transcoding processing);
3. The output of the page garbled such as:%E7%94%B1%E6%9D%A5, Test in Chinese is: Origin.
Tired to know the friend pointing under, thank you!
------Solution--------------------
Why does the URL parameter not apply to UrlEncode?
------Solution--------------------
%e7%94%b1%e6%9d%a5 is not garbled, is the string after UrlEncode encoding
echo urldecode ('%e7%94%b1%e6%9d%a5 '); Origin
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.