URL编码西班牙语单词

时间:2013-02-28 07:41:33

标签: php javascript html urlencode encode

我正在建立一本西班牙语词典。我从www.rae.es得到了定义。问题:

搜索引擎无法使用急性重音(áéíóú)。输出是来自rae.es的错误消息,指出该单词无法识别。例如:对于单词“baúl”,出现(翻译):“单词baúl未在字典中注册。”

如何使用urlencode()或其他功能来解决此问题?请通过右键单击检查代码,并使用Google Chrome,Safari或Firefox检查元素。

http://verbum.xtrweb.com/verbumpost.php?word=ba%C3%BAl&word0=

谢谢!

2 个答案:

答案 0 :(得分:1)

尝试urlencode(utf8_encode($string))而非urlencode($string)

答案 1 :(得分:0)

在搜索字词上使用htmlentities并尝试使用post,而不是获取: http://php.net/manual/en/function.htmlentities.php