为什么“%"编码为%EB,但也编码为%C3%AB? [英] Why is ë percent encoded to %EB but also to %C3%AB?
本文介绍了为什么“%"编码为%EB,但也编码为%C3%AB?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我在网络应用程序中的表单中输入ë时,谷歌浏览器会将其百分比编码为%C3%AB.
When I enter ë into a form on my web application, this is percent encoded by Google Chrome to %C3%AB.
当我使用PHP的urlencode('ë');这被编码为%EB.
When I use PHP's urlencode('ë'); This is encoded into %EB.
为什么编码不同?
如何使用与PHP 4的Google Chrome浏览器相同的编码方式进行编码?
How can I encode with the same encoding as Google Chrome with PHP 4?
推荐答案
%EB
是ISO-8859-1格式(单个字符).
%EB
is the ISO-8859-1 form (a single character).
%C3%AB
是UTF-8格式(e
+ ¨
).
%C3%AB
is the UTF-8 form (e
+ ¨
).
应该开箱即用(如果您的文件使用PHP和UTF-8的较新版本).
It should work out of the box (if you use a newer version of PHP and UTF-8 for your files).
这篇关于为什么“%"编码为%EB,但也编码为%C3%AB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文