diff options
| author | Nick Frazier <nrf@nickfrazier.com> | 2021-10-05 08:42:45 -0400 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-10-08 12:26:06 +0200 |
| commit | bf4be3711acfbfc765fb17dc238b1b9bbad5b7be (patch) | |
| tree | 5ba8e8b3defbc3acbd7cc6d5bb1141963747bfd6 /docs/howto/deployment/wsgi | |
| parent | 28f66b2783e52d5be51887c31cd2be907b820e11 (diff) | |
Improved docs regarding UTF-8 support with Apache and mod_wsgi.
Diffstat (limited to 'docs/howto/deployment/wsgi')
| -rw-r--r-- | docs/howto/deployment/wsgi/modwsgi.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/docs/howto/deployment/wsgi/modwsgi.txt b/docs/howto/deployment/wsgi/modwsgi.txt index e12c927cf4..aba4178e7e 100644 --- a/docs/howto/deployment/wsgi/modwsgi.txt +++ b/docs/howto/deployment/wsgi/modwsgi.txt @@ -83,15 +83,21 @@ should put in this file, and what else you can add to it. .. admonition:: Fixing ``UnicodeEncodeError`` for file uploads - If you get a ``UnicodeEncodeError`` when uploading files with file names - that contain non-ASCII characters, make sure Apache is configured to accept - non-ASCII file names:: + If you get a ``UnicodeEncodeError`` when uploading or writing files with + file names or content that contains non-ASCII characters, make sure Apache + is configured to support UTF-8 encoding:: export LANG='en_US.UTF-8' export LC_ALL='en_US.UTF-8' A common location to put this configuration is ``/etc/apache2/envvars``. + Alternatively, if you are :ref:`using mod_wsgi daemon mode<daemon-mode>` + you can add ``lang`` and ``locale`` options to the ``WSGIDaemonProcess`` + directive:: + + WSGIDaemonProcess example.com lang='en_US.UTF-8' locale='en_US.UTF-8' + See the :ref:`unicode-files` section of the Unicode reference guide for details. |
