简体   繁体   中英

URL encoding spanish words

I'm building a Spanish dictionary. I get the definitions from www.rae.es . Problem:

the search engine doesn't work with acute accents ( á é í ó ú ). The output is an error message from rae.es stating that the word is not recognized. For example: for the word "baúl", this comes up (translated): "The word baúl isn't registered in the dictionary."

How can I use urlencode() or other function to solve this problem? Please check the code by right click and inspect element with Google Chrome, Safari or Firefox.

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

Thanks!

尝试做urlencode(utf8_encode($string))而不只是urlencode($string)

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM