Andrew Dunstan <[EMAIL PROTECTED]> writes:
> I don't know. Reading that code just makes my head spin ...

Yeah, too many ifdefs :-(.  But I suppose that the initial
"#ifdef LOCALE_ENVIRON_REQUIRED" block is not compiled on sane
platforms, meaning that the first code in the routine is the
unconditional
    if (! setlocale(LC_ALL, ""))
        setlocale_failure = TRUE;

> I should have thought a library shouldn't make too many assumptions
> about locale settings anyway.

Indeed; I think a pretty strong case can be made that this is a Perl
bug.  It's reasonable to be doing the setlocale call in a standalone
Perl executable, but libperl should just work with whatever locale
settings have been chosen by the surrounding program (ie, all these
calls should be setlocale(LC_xxx, NULL) in the libperl case).

> I'm just about out of ideas and right out of time to spend on this.

We could just file a Perl bug report and wait for them to fix it.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to