Question

Yes i am french, and have to deal with people that upload files with accent... in html and php i have done a little file lister and a link to all those files when click on the name... really simple...

the problem is, all the normal file download perfect when click on... except for the one with accent in the name... it return a error 404

how to encode the href string to get the proper donwload link to get the file

example : http://nivelaxe.com/FTP/yvonne/14-04-19_P%C3%A2ques.zip shold be fine, but NO... the file on server is : http://nivelaxe.com/FTP/yvonne/14-04-19_Pâques.zip

i am lost, and google dont help !

--

new test link :

the content of the file with accent is : èàç

Was it helpful?

Solution

I tried to url urlencode last part of url and the result is this: http://nivelaxe.com/FTP/yvonne/test_accent_%E8%E0%E7.txt

Is this your uploaded file?

Also works for zip file which you mentioned in question: http://nivelaxe.com/FTP/yvonne/14-04-19_P%E2ques.zip

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top