uWSGI / Emperor: UnicodeEncodeError: 'ascii' codec can't encode character

前端 未结 4 1465
离开以前
离开以前 2021-01-13 05:30

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

相关标签:
4条回答
  • 2021-01-13 06:03

    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
    
    0 讨论(0)
  • 2021-01-13 06:04

    Add to uwsgi.ini:

    env = LANG=en_US.UTF-8
    

    Only this format helped for me

    0 讨论(0)
  • 2021-01-13 06:12

    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
    
    0 讨论(0)
  • 2021-01-13 06:17

    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

    0 讨论(0)
提交回复
热议问题