如何编码包含Unicode的URL?我想将它传递给命令行工具,我需要先对它进行编码。使用html格式的URL编码
<form action="index.php" method="get" >
<input type="text" name="find" value="عربي" /><br />
<input type="submit" value="search" />
<form />
示例: http://localhost/index.php?find =عربي
http://localhost/index.php?find=%DA%D1%C8%ED变得
http://www.drupalcode.com/api/function/mb_urlencode/contrib-5.x-1.x – 2012-01-30 14:45:08
所以你想'عربي'作为参数值,但不知道如何将其转换为'%DA%D1%C8%ED',对吗? – Gumbo 2012-01-30 14:45:46
为什么你不使用POST? POST请求将正确编码。 – 2012-01-30 14:46:11