httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <>
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 


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message