A bug that encountered a URL transcoding today

Source: Internet
Author: User
Tags urlencode

There is a page, through the window.open to open another page, to open the address inside there is a parameter title, the value is Chinese, is through the function of PHP urlencode conversion, but jump past the title of the first Chinese characters displayed normal, is the Chinese character, The second character is automatically encoded, the address bar is no longer displayed in Chinese characters, in order to solve this problem, I put the value of Chinese characters with JS Encoderuicomponent transcoding, instead of UrlEncode, and then jump to the past, the address bar in the normal display of Chinese characters, Why the first is good, the second character is automatically transcoded , this reason I still do not understand, is window.open reason? Not sure, but, I learned that for the same paragraph of text, PHP urlencode and JS encodeuricomponent The encoding is not the same. If any of the Daniel know, still look at pointing twos

A bug that encountered a URL transcoding today

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.