T
T
Taurus2019-06-08 18:46:31
Nginx
Taurus, 2019-06-08 18:46:31

How to open a file in a browser whose name contains unicode?

A file with the name is saved on the server. name-%e2%84%96-112-100g__0-200x150.jpg
When you try to open it in the browser, the name is changed to name-№-112-100g__0-200x150.jpgand nginx gives 404.
Is there a way to correctly open such a file in the browser without renaming it on the server?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Moskus, 2019-06-08
@Taurus

Naturally, you just need to replace the characters in the URL %with their URL-encoded equivalent %25. URL decoding is not recursive, so when decoded it will turn back into %.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question