Apache doesn't usually inherit the default system encoding and the
locale/lang needs to be set explicitly in the Apache startup files.

If you are using mod_wsgi 3.4 and using daemon mode, you can instead use
the 'lang' and 'locale' options to WSGIDaemonProcess to override the
default of ASCII that Apache usually picks up.

If using embedded mode, of mor_wsgi 3.3 or older, you would still need to
set appropriate LANG and LOCALE environment variables in Apache startup
files.

See for example:

https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/modwsgi/#if-you-get-a-unicodeencodeerror

The name of the system file you can modify them will though depend on your
Linux distribution.

Graham



On 11 March 2013 22:08, Markos Kapes <[email protected]> wrote:

> How can I configure mod_wsgi to support utf8 in mod_wsgi.Log? I get
> 'UnicodeEncodeError if I try to print a non-ascii string to sys.stderr. I'm
> using python 2.7, and cherrypy 3.2.2. The default python encoding is ascii,
> but the default system encoding is utf8.
>
> Thanks,
> --Markos
>
> --
> You received this message because you are subscribed to the Google Groups
> "modwsgi" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/modwsgi?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/modwsgi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to