2
I have a search system, but it doesn’t respond very well with special characters, like: ç
, ã
, á
, ô
, etc..
So I want us to input
the user type for example: "Union" and GET['nome']
come out kind of like this: Uni%C3%A3o
.
I’ve tried using the htmlspecialchars
but nothing happens!
The riot is, the search is on the Supercell API developer of Clash of Clans, and the search is only successful when special characters are in this format!
This format is the encoded url RFC 3629. Why exactly do you want it to be in this format to solve the search problem in your database? (*the negative is not mine.. but I voted to close as "not clear enough")
– Daniel Omine
Solved, it is because the search is in the Supercell API developer of Clash of Clans, and the search is only successful when special characters are in this format!
– Sampaio Leal
Okay, I withdrew the vote and added the explanation at the end of your question. Next times make it clear. And on the solution just use urlencode(). You don’t need htmlentities()... But you may still have problems depending on the charset. So don’t rely too much because inconsistencies may occur.
– Daniel Omine
Thank you, that’s my only problem in the system
– Sampaio Leal