P
Peter Valdemar Mørch
Hi,
I've read in `perldoc perllocale` about the need to configure LANG or
LC_ALL to get locales to work properly with perl. But when attempting
to develop CGI scripts I do not have control over apache's
configuration that exports the hardcoded environment variable LANG=C.
Is there really no way to get locales to work if LANG=C, or any other
value not mentioned in locale -a?
This script prints $! in french if LANG=en_US or has any other value
from
locale -a, but in english otherwise, e.g. under apache...
#!/usr/bin/perl -w
$ENV{"LANGUAGE"}="fr";
open I, "nonexistant" or print $!;
close I;
Without some sort of workaround, I either have to modify httpd.conf to
export LANG=en_US or use something other than gettext, neither of
which sound exciting...
I've read in `perldoc perllocale` about the need to configure LANG or
LC_ALL to get locales to work properly with perl. But when attempting
to develop CGI scripts I do not have control over apache's
configuration that exports the hardcoded environment variable LANG=C.
Is there really no way to get locales to work if LANG=C, or any other
value not mentioned in locale -a?
This script prints $! in french if LANG=en_US or has any other value
from
locale -a, but in english otherwise, e.g. under apache...
#!/usr/bin/perl -w
$ENV{"LANGUAGE"}="fr";
open I, "nonexistant" or print $!;
close I;
Without some sort of workaround, I either have to modify httpd.conf to
export LANG=en_US or use something other than gettext, neither of
which sound exciting...