UnicodeEncodeError: 'ascii' codec can't encode character

前端 未结 12 807
予麋鹿
予麋鹿 2020-11-30 20:31

When uploading files with non-ASCII characters I get UnicodeEncodeError:

Exception Type: UnicodeEncodeError at /admin/studio/newsitem/add/
Exception Value: \         


        
12条回答
  •  北海茫月
    2020-11-30 20:53

    Hope this would help. In my case, I'm running django through daemontools.

    Setting

    export LANG='en_US.UTF-8'
    export LC_ALL='en_US.UTF-8'
    

    in run script before executing manage.py resolved the issue with uploads filename

提交回复
热议问题