In a page, I have this reference:
<a href="Schulte_Einf%C3%BChrung.pdf">Page</a>
I've written a function to see if the file that is referenced to exists. But in this case, the file is named
Schulte_Einführung.pdf
I know that C3 BC is the UTF-8 encoding of ü, but how can I decode %C3%BC
and turn it into ü? All the usual functions like utf_decode
and so on don't do anything.
I can't change the filename (because I pull it from a backup file), and I also can't change the encoding because then the page could break. So is there a way to compare Schulte_Einf%C3%BChrung.pdf
and Schulte_Einführung.pdf
so that they will be equal?
I know that C3 BC is the UTF-8 encoding of ü
It isn't. It is an ASCII description of the UTF-8 encoding.
Since it is data encoded in a URL, use the urldecode
function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With