LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Perl locale warning (http://www.linuxquestions.org/questions/slackware-14/perl-locale-warning-578824/)

jafriede 08-21-2007 10:10 PM

Perl locale warning
 
I am running Slackware 10.0 as a server with kernel 2.6.10. When running a Perl script, I get the following:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_COLLATE = "C",
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").

I have seen a few posts relating to this but have all been with Debian distros. When I type "locale -a" it indicates that "en_US" is supported. If I export LC_ALL="C", the error goes away but I read that it is not really a good solution. Any ideas?

Thanks

msantinho 08-22-2007 04:15 PM

what's the output of:
Code:

$ locale
?

jafriede 08-22-2007 04:32 PM

Quote:

Originally Posted by msantinho (Post 2867280)
what's the output of:
Code:

$ locale
?

Output of "locale":

LANG=en_US
LC_CTYPE="en_US"
LC_NUMERIC="en_US"
LC_TIME="en_US"
LC_COLLATE=C
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=

Here is the output of "locale -a". I only included the English listings:

en_AU
en_AU.utf8
en_BW
en_BW.utf8
en_CA
en_CA.utf8
en_DK
en_DK.utf8
en_GB
en_GB.iso885915
en_GB.utf8
en_HK
en_HK.utf8
en_IE
en_IE.utf8
en_IE.utf8@euro
en_IE@euro
en_IN
en_NZ
en_NZ.utf8
en_PH
en_PH.utf8
en_SG
en_SG.utf8
en_US
en_US.iso885915
en_US.utf8
en_ZA
en_ZA.utf8
en_ZW
en_ZW.utf8

msantinho 08-22-2007 04:43 PM

I don't see nothing wrong there.
Check this info: http://perldoc.perl.org/perllocale.html#LOCALE-PROBLEMS

jafriede 08-23-2007 09:46 AM

Quote:

Originally Posted by msantinho (Post 2867309)
I don't see nothing wrong there.
Check this info: http://perldoc.perl.org/perllocale.html#LOCALE-PROBLEMS

I guess I will stick with LC_ALL="C".
It works but I'm not quite sure what the ramifications are.

Thanks


All times are GMT -5. The time now is 10:51 AM.