Why is ë percent encoded to %EB but also to %C3%AB?

空扰寡人 提交于 2019-12-10 20:41:04

问题


When I enter ë into a form on my web application, this is percent encoded by Google Chrome to %C3%AB.

When I use PHP's urlencode('ë'); This is encoded into %EB.

Why are the encodings different?

How can I encode with the same encoding as Google Chrome with PHP 4?


回答1:


%EB is the ISO-8859-1 form (a single character).

%C3%AB is the UTF-8 form (e + ¨).

It should work out of the box (if you use a newer version of PHP and UTF-8 for your files).



来源:https://stackoverflow.com/questions/12860837/why-is-%c3%ab-percent-encoded-to-eb-but-also-to-c3ab

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!