I'm running Django with mod_fcgid and Apache
UnicodeEncodeError: 'ascii' codec can't encode characters
What to do if you get the error.
You need to add the following line to httpd.conf.
FcgidInitialEnv LANG "ja_JP.UTF-8"
"Source" https://code.djangoproject.com/ticket/17686 "django wouldn't get the locale settings of my user. In fact the fcgi script wouldn't, even if my envvars script was properly configured."
As you can see, for some reason setting it with envvars etc. has no effect. .. .. Setting "ja_JP.UTF-8" in an environment variable such as LC_ALL did not work. ..
There was no problem with mod_wsgi. .. .. I spent hours finding this information.
Recommended Posts