From: | Andreas Seltenreich <andreas+pg(at)gate450(dot)dyndns(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Manuel Sugawara <masm(at)fciencias(dot)unam(dot)mx>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: localization problem (and solution) |
Date: | 2005-12-21 07:06:44 |
Message-ID: | 87wthzhqt7.fsf@gate450.dyndns.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Tom Lane writes:
> I looked into this a bit more, and it seems the issue is that libperl
> will do
> setlocale(LC_ALL, "");
> the first time any locale-related Perl function is invoked. To defend
> ourselves against that, we'd have to set more environment variables than
> just LC_COLLATE and LC_CTYPE.
>
> What I'm thinking about is:
> * during startup, putenv("LC_ALL=C") and unsetenv any other LC_ variables
> that may be lurking, except LC_MESSAGES.
> * copy LC_COLLATE and LC_CTYPE into the environment when we get them
> from pg_control, as Manuel suggested.
I'm afraid having LC_ALL in the environment at this time would still
do the wrong thing on setlocale(LC_ALL, ""); since a LC_ALL
environment variable overrides the other categories. Maybe setting
LANG instead would be a better choice?
regards,
Andreas
--
From | Date | Subject | |
---|---|---|---|
Next Message | Martin Pitt | 2005-12-21 07:21:27 | Re: horology regression test failure |
Previous Message | Bruce Momjian | 2005-12-21 04:47:24 | I am back online again |