Process percent-encoded string with special characters in PHP

php, string

Solution

echo rawurldecode ('M%C3%B2nica'); // prints Mónica

You can either use urldecode() or rawurldecode(), but in your case it probably doesn't make a difference. (read more on this here: urlencode vs rawurlencode?)

Problem

I got an string like: M%C3%B2nica So I need to get something like "Mònica". Which is the best way in PHP?

Original source

Related problems