What operating system variant/version are you on?

For Linux systems I didn’t know any which actually preserved the purpose of the 
envvars file.

Graham

> On 27 Aug 2015, at 11:50 pm, [email protected] wrote:
> 
> Dear Graham,
> 
> Thank you for all your inputs. I will definitively read all references you 
> gave. And I also bookmarked your blog. I didn't know you had one :-)
> 
> In the meantime I found where it all comes from, made a small change and now 
> ... all works fine.
> 
> Solution
> ------------
> 
> There is a file /etc/apache2/envvars referred to by /etc/apache2/apache2.conf.
> In that file, I found the following lines:
> 
> ## The locale used by some modules like mod_dav
> export LANG=C
> ## Uncomment the following line to use the system default locale instead:
> #. /etc/default/locale
> 
> As I don't need mod_dav, neither is it compiled with Apache2 ($apache2ctl 
> -l), neither is it loaded with Apache2 ($apache2ctl -M), I commented / 
> uncommented the 2 lines so that it now looks like:
> 
> #export LANG=C
> . /etc/default/locale
> export LANG
> 
> After a stop/start of Apache2, everything works fine and when I put the code:
> 
> from locale import getpreferredencoding
> prefcoding = getpreferredencoding()
> from os import environ
> lang = environ["LANG"]
> g = open('envresults', 'a')
> g.write('LANG: ' + lang + '\n')
> g.write('PrefCod: ' + prefcoding + '\n')
> 
> in my WSGI application, it gives me the same as the interpreter:
> 
> rse@Alibaba:~/test$ cat envresults
> LANG: en_US.UTF-8
> PrefCod: UTF-8
> rse@Alibaba:~/test$
> 
> Thank you for your assistance. All the best.
> Kind regards, René
> 
> -- 
> 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] 
> <mailto:[email protected]>.
> To post to this group, send email to [email protected] 
> <mailto:[email protected]>.
> Visit this group at http://groups.google.com/group/modwsgi 
> <http://groups.google.com/group/modwsgi>.
> For more options, visit https://groups.google.com/d/optout 
> <https://groups.google.com/d/optout>.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to