httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: i18n support
Date Mon, 26 Mar 2007 19:27:17 GMT
On Mon, Mar 26, 2007 at 02:26:28PM -0400, Michael B Allen wrote:
> However, from searching the archives I recall some comments that it was
> perhaps inappropriate to use anything but the C locale because globally
> changing the locale might yield non-determinisitic behavior. Is that
> true? Or is it perfectly save for someone to run in de_DE.ISO-8859-1
> for example?

There are a couple of issues here:

1) if your module is used in a thread-based server, changing the 
(process global) locale from one thread will affect all the threads in 
the process

2) there are some places in httpd which use locale-specific string 
comparisons against strings coming from the user and network.  Changing 
the locale can have "interesting" effects on those comparisons, 
depending on the specific locale used.  (the Turkish locale is a nice 
example, where "i" and "I" don't compare as case-insensitive equals)

So yes, the general recommendation to not change the locale is a good 
one.  A library which only works in a *specific* locale is rather 
awkward.

joe

Mime
View raw message