i have big problem with encoding on uwsgi/emeror/nginx server. My app is developed to batch excel files processing.
I use latest version flask and flask-extensions a
add the following lines to your abissk_uwsgi.ini file to enforce uwsgi to use UTF-8.
env LANG=en_US.utf8
env LC_ALL=en_US.UTF-8
env LC_LANG=en_US.UTF-8
Add to uwsgi.ini
:
env = LANG=en_US.UTF-8
Only this format helped for me
for Russian language add this in uwsgi.ini
env = LANG=ru_RU.utf8
env = LC_ALL=ru_RU.UTF-8
env = LC_LANG=ru_RU.UTF-8
None of the variables LANG
, LC_ALL
, LC_LANG
helped me.
I fixed the bug only adding this to the uwsgi.ini:
env = PYTHONIOENCODING=UTF-8