Robin, hi
maybe we're talking about slightly different things. I'll give my best to
sort this out:
1 The error message "setting locale failed" may be caused
by an empty environment variable LC_LANG.
2 This is definitively not the only cause for this message.
You'll get the same error if you set LC_LANG to anything
other then "C".
3 If you do this and if you then try to start a perl script, then
the last internal action before the error message is an
unsuccessful attempt to open the file LC_COLLATE.
I set LC_ALL and LC_LANG in the shell environment and in the environment.plist to
"DE". This was the result:
bash-2.05a$ echo $LC_ALL
DE
bash-2.05a$ echo $LC_LANG
DE
bash-2.05a$ perl -v
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = "DE",
LANG = "de"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
This is perl, v5.8.0 built for darwin-thread-multi
I looked at the perl process and found:
883 perl CALL open(0xbffff600,0,0x1b6)
883 perl NAMI "/usr/share/locale/DE/LC_COLLATE"
883 perl RET open -1 errno 2 No such file or directory
883 perl CALL write(0x2,0x4c360,0x26)
883 perl GIO fd 2 wrote 38 bytes
"perl: warning: Setting locale failed.
I hope my explanations are understandable and the problem is now clearer as before. I
made the mistake not to set "LC_ALL" in the first time. But the solution is not to
set LC_ALL to any permitted value. The only solution is: "LC_ALL=C" .
You see this contradiction already in the error message, that says: Your "de locale"
is installed and supported - but I can't set it. Why? And why is there no file
LC_COLLATE that perl seems to need?
Jens-Christoph
Robin <[EMAIL PROTECTED]> schrieb am 15.01.03 10:22:42:
> On Wednesday, January 15, 2003, at 03:36 PM, Jens-Christoph Brendel
> wrote:
>
> > I hope I don't getting on your nerves,
> no don't worry you're looking for a solution, been there meself. But
> maybe we're talking about different errors - the solution I'm offering
> is for the following error:
>
> "perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
> LC_ALL = (unset),
> LANG = "de"
> are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").
>
> This is perl, v5.8.0 built for darwin-thread-multi "
>
> This still being the case the error is thrown up because LC_ALL, the
> default locale, is not set
>
> > but your explanation do not fit to my observations. Before I set
> > "LC_LANG=C" in the environment.plist I got the mentioned error message
> > by example after I entered "perl -v" in a terminal window by example.
> that sounds correct - the default locale for perl isn't set - perl
> complains
>
> > There is no 'use locale' pragma but perl didn't ignored the "LANG=de"
> > setting in my shell environment.
>
> presumably you ran this in the shell which would also be consistent -
> the shell adds the missing ENV variable for LANG, but you didn't get
> the shell to set LC_ALL=C
>
> > With these settings (LC_ALL unset, LANG=de in the shell environment)
> and this is the point I believe you're missing - LC_ALL must be set to
> C or perl complains. Have you tried setting it?
> The whole of the locale machinery is built around the fact this
> constant will be there and that is what the (above) warning is saying:
>
> "I can't find a value for LC_ALL but so you can get pattern matching
> and comparisions of data I'm defaulting to the C locale anyway, you
> might want to check into things your end"
>
> HTH
>
> Robin
>