apache2+modwsgi+python : ANSI_X3.4-1968 encoding ?

483 views
Skip to first unread message

jujule

unread,
Aug 6, 2010, 6:59:14 AM8/6/10
to modwsgi
Hi all

I have this strange behaviour with Apache+mod_wsgi and python
(django). I use Apache/2.2.9 (Debian) mod_wsgi/2.5 Python/2.5

In Python Shell :

>> sys.getfilesystemencoding()
'UTF-8'

using WSGI, getfilesystemencoding() gives me ANSI_X3.4-1968

Everything works great except with encoded files or paths names.
Throws an error with this.config and works ok with django built in dev
server.

The wsgi test file :

#!/usr/bin/python2.5
# -*- encoding: UTF-8 -*-
import sys
print sys.getfilesystemencoding()

gives the infamous ANSI_X3.4-1968

Any idea ? Im stuck with this and cant understand


Thanx

Julien

jujule

unread,
Aug 6, 2010, 9:52:24 AM8/6/10
to modwsgi
My path and filenames were iso encoded on the file system

I used convmv to rename paths and files to UTF-8

And added this to /etc/apache2/envvars (debian)

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

works like a charm !
Reply all
Reply to author
Forward
0 new messages