| | 381 | |
| | 382 | If you get a UnicodeEncodeError |
| | 383 | =============================== |
| | 384 | |
| | 385 | If you're taking advantage of the internationalization features of Django |
| | 386 | (see :ref:`topics-i18n`), you may come across a curious problem. |
| | 387 | Namely, uploading of non-ascii filenames with the storage system |
| | 388 | with the default Apache settings on most systems will trigger |
| | 389 | a ``UnicodeEncodeError`` exceptions when calling functions like ``os.path()``. |
| | 390 | To avoid these issues, ensure that the following lines are included in your |
| | 391 | Apache ``envvars`` file (typically found in ``/etc/apache2/envvars``):: |
| | 392 | |
| | 393 | export LANG='en_US.UTF-8' |
| | 394 | export LC_ALL='en_US.UTF-8' |
| | 395 | |
| | 396 | Then restart Apache. |