L
L
Lucius Mooning2018-07-24 09:37:55
Laravel
Lucius Mooning, 2018-07-24 09:37:55

How to solve The filename fallback must only contain ASCII characters error when downloading a file?

Good afternoon!
1) I am looking for a solution to the error The filename fallback must only contain ASCII characters during file transfer for download.
I do this: response()->download($path), a unique name of the stored file is passed, but I want the file to be downloaded with the name of the file that was originally downloaded.
If you pass the name in English as the second parameter in download, then okay, it works.
And if it is in Russian, I get an error:
The filename fallback must only contain ASCII characters
How, for example, do the barryvdh/laravel-dompdf add-ons do , which allow you to download a file with names containing unicode characters?
How are there solutions if you really need a file name with unicode characters?
Or alternatively, convert the string to ASCII.
2) When saving a file with a name containing unicode characters to storage, it also causes an error. Is there a solution?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yan-s, 2018-07-24
@Yan-s

Have you tried google? For example https://stackoverflow.com/questions/20094286/larav...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question