Fri, Sep 25, 2009 at 12:54 AM, Graham Dumpleton
<[email protected]> wrote:
>
> 2009/9/24 Gábor Farkas <[email protected]>:
>>
>> hi,
>>
>> i'm trying to setup a django application using modwsgi
>> in the daemon mode,
>> and i need to make sure the locale is set up correctly,
>> meaning sys.environment['LANG'] is 'en_US.utf8',
>> and not 'C'.
>>
>> what is the recommended way to do this?
>>
>> should i do it in my python-wsgi script with
>> "
>> sys.environment['LANG'] = 'en_US.utf8'
>> "
>
> You mean:
>
>  os.environ['LANG'] = 'en_US.utf8'

yes :)

>
> The only way I know that is 100% guaranteed to work is for stock
> standard Apache installation, ie., from original source code, you
> modify the 'envvars' file that should be in same directory as the
> 'httpd' executable. In this you would add:
>
>  LANG='en_US.utf8'
>  export LANG
>
> On Linux distributions with packaged Apache, this file doesn't
> generally exist. The only solution in that case is to modify the init
> startup file for Apache service and add it there instead.

i'm running debian lenny, and '/etc/apache2/envvars' exists there.
i added
EXPORT LANG=en_US.utf8
to it, and it sends it correctly to the python wsgi application.

thanks for the help,
gabor

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

Reply via email to