httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <jor...@redhat.com>
Subject Re: [users@httpd] setlocale() usage in Apache 2.0 WebServer modules
Date Tue, 14 Dec 2004 12:25:22 GMT
On Sun, Dec 12, 2004 at 09:48:39AM +0530, Lakshman wrote:
> Question? ======= Since we are explicitly doing
> setlocale(LC_CTYPE,"en_US.iso88591") in our web component, we are
> worried that it will affect other components on the Web Server whose
> locale may be different than Latin1. How to solve this problem? Is
> their a way to set locale for my web component alone without affecting
> other web components or modules on Apache-2 web server? 

It can do: for instance, date formatting in various places may be done
using locale-specific formatting.  But it shouldn't cause any critical
problems, especially if you only switch to an ISO-8859-1 locale.

To be paranoid, you could simply save and restore the locale using a 
call to setlocale(LC_ALL, NULL) to retrieve the current locale string.
(this all presumes you are using prefork rather than the threaded worker 
MPM)

joe

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message