Page I wrote a function to see if ...">

Php - translate "% C3% BC" to ü

On the page I have this link:

<a href="Schulte_Einf%C3%BChrung.pdf">Page</a>

I wrote a function to see if the referenced file exists. But in this case, the file is called

Schulte_Einführung.pdf

I know that C3 BC is UTF-8 ü encoded, but how can I decode %C3%BCand convert it to ü? All normal functions, such as utf_decodeetc., do nothing.

I cannot change the file name (because I am pulling it out of the backup file), and I also cannot change the encoding, because the page may break. So, is there a way to compare Schulte_Einf%C3%BChrung.pdfand Schulte_Einführung.pdfso that they were equal?

+4
source share
2 answers

I know that C3 BC is a UTF-8 encoding ü

. ASCII- UTF-8.

, URL-, urldecode.

+5

urldecode , & # xc3; & # xbc;, UTF8- & uuml;, .

0

Source: https://habr.com/ru/post/1536076/


All Articles