Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl error

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
0
0
IL
Hi,

ON AIX 5.2 +ML01,running a perl script,get an error :

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

env|grep LC
LC__FASTMSG=true
# env | grep LANG
LANG=En_US

So what is wrong ?

Long live king Moshiach !
 
These errors are generated because perl is trying to set up for a locale setting of 'en_US', and failing. The locale environment variables are used to tell the system how it should behave when doing things which are common, but which vary in different parts of the world -- for example, formatting a date. Perl attempts to determine the locale it should use by looking at the environment when it starts up. Perl will complain when any of the environment variables used to indicate your locale are set to values which don't exactly match the locale information stored on your system. The solution is to set these environment variables to the precise values perl expects to see.

Assuming that you intended for the locale to be English, in the United States variant, add the following lines to your initialization file (.login, .profile, .bashrc, .zlogin). (The lines shown are for csh, and the E.)

setenv LC_ALL en_US.ISO_8859-1
setenv LC_CTYPE en_US.ISO_8859-1
setenv LANG en_US.ISO_8859-1
setenv LESSCHARSET latin1

For more information on perl's locale support, see the perllocale documentation included with the perl distribution. You can read this by typing 'man perllocale' at the shell prompt.


Mike

"A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant."

 
P.S.

Now the error is slightly different:

perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = "en_US.ISO_8859-1",
LC__FASTMSG = "true",
LC_CTYPE = "en_US.ISO_8859-1",
LANG = "en_US.ISO_8859-1"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").


Long live king Moshiach !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top