Non-English paths not working

mshzsh

New Member
#1
Hi guys, I'm using django and the ols wsgi Server App.
but when I use non-English letters in the path of files, I get an error of 500.
of course, in the context settings, I set the "Add Default Charset" option to "on" and set the "Customized Default Charset" to "utf-8", but it still didn't work.
what's the solution?

it works :
example.com/media/images/pars/img2.jpg

it's not working :
example.com/media/images/پارس/img.jpg
 

mshzsh

New Member
#2
I edited the following file and changed the "encoding('iso-8859-1')" in the "get_bytes_from_wsgi" method to "encoding('utf-8')" and the problem was solved, but this is not a good solution
Please let me know if anyone finds a suitable solution ;)
  • /usr/local/lib/python3.7/dist-packages/django/core/handlers/wsgi.py
 
Top