Is the environment variable LC_CTYPE set separately?

The code for getpreferredencoding() is really weird.

        def getpreferredencoding(do_setlocale = True):
            """Return the charset that the user is likely using,
            according to the system configuration."""
            if do_setlocale:
                oldloc = setlocale(LC_CTYPE)
                try:
                    setlocale(LC_CTYPE, "")
                except Error:
                    pass
                result = nl_langinfo(CODESET)
                setlocale(LC_CTYPE, oldloc)
                return result
            else:
                return nl_langinfo(CODESET)

Graham

On 09/12/2014, at 8:45 PM, Nikolai Prokoschenko <[email protected]> wrote:

> Hi Graham,
> 
> just to extend on what I've written before: the main apache log is of course 
> logging the following:
> 
> [Tue Dec 09 10:41:28 2014] [debug] src/server/mod_wsgi.c(8864): mod_wsgi 
> (pid=5990): Setting lang to de_DE.UTF-8.
> [Tue Dec 09 10:41:28 2014] [debug] src/server/mod_wsgi.c(8871): mod_wsgi 
> (pid=5990): Setting locale to de_DE.UTF-8.
> 
> On Tuesday, December 9, 2014 10:38:53 AM UTC+1, Graham Dumpleton wrote:
> 
> Just so have full context, can you provide the full WSGIDaemonProcess 
> directive line so can see everything that is being set.
> 
> Again, slightly anonymized:
> 
> WSGIDaemonProcess my_application user=app_user group=app_group 
> lang=de_DE.UTF-8 locale=de_DE.UTF-8 processes=20 threads=1 
> display-name=%{GROUP} 
> python-path=/srv/my_application/virtualenv/lib/python2.6/site-packages
> 
> WSGIProcessGroup my_application
> 
> WSGIApplicationGroup %{GLOBAL}
> 
> Nikolai

-- 
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