Home > Archive > PERL Beginners > November 2006 > Why this error ?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| gamito@gmail.com 2006-11-21, 7:57 am |
| Hi,
Can someone tell me please why i'm getting this error with this code ?
I'm running PERL 5.6.0 on a AIX.
Any help would be appreciated.
Warm Regards,
Mário Gamito
---------------------------------------
LANGUAGE = "en_IE:en_US:en_GB:en",
LC_ALL = "unset",
LANG = "en_US";
@months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
@w Days = qw(Sun Mon Tue Wed Thu Fri Sat Sun);
($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfW ,
$dayOfYe
ar, $daylightSavings) = localtime();
$year = 1900 + $yearOffset;
$theTime = "$hour:$minute:$second, $w Days[$dayOfW ] $months[$month]
$dayOfM
onth, $year";
print $theTime;
---------------------------------------
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LC__FASTMSG = "true",
LANG = "en_GB"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
----------------------------------------
| |
|
| On Tue, 21 Nov 2006 08:40:42 +0000
"M=E1rio Gamito" <gamito@gmail.com> wrote:
> Hi,
>=20
> Can someone tell me please why i'm getting this error with this code ?
>=20
> I'm running PERL 5.6.0 on a AIX.
>=20
> Any help would be appreciated.
>=20
> Warm Regards,
> M=E1rio Gamito
>=20
> ---------------------------------------
> LANGUAGE =3D "en_IE:en_US:en_GB:en",
> LC_ALL =3D "unset",
> LANG =3D "en_US";
>=20
> @months =3D qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
> @w Days =3D qw(Sun Mon Tue Wed Thu Fri Sat Sun);
> ($second, $minute, $hour, $dayOfMonth, $month, $yearOffset, $dayOfW ,
> $dayOfYe
> ar, $daylightSavings) =3D localtime();
> $year =3D 1900 + $yearOffset;
> $theTime =3D "$hour:$minute:$second, $w Days[$dayOfW ] $months[$month]
> $dayOfM
> onth, $year";
> print $theTime;
>=20
> ---------------------------------------
>=20
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
> LC_ALL =3D (unset),
> LC__FASTMSG =3D "true",
> LANG =3D "en_GB"
> are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").
>=20
> ----------------------------------------
Had a similiar problem with a debian distro and it was to do with the way t=
he OS was built (or the way Perl was built)
It has nothing to do with your program
The last two lines of the error message above should have given you the clu=
e, but for the life of me can't remember the solution, other than something=
was rebuilt
Owen
| |
| Ken Foskey 2006-11-24, 9:57 pm |
| On Tue, 2006-11-21 at 08:40 +0000, Mário Gamito wrote:
> perl: warning: Setting locale failed.
> perl: warning: Please check that your locale settings:
> LC_ALL = (unset),
> LC__FASTMSG = "true",
> LANG = "en_GB"
> are supported and installed on your system.
> perl: warning: Falling back to the standard locale ("C").
try this before your script:
export TZ=AEDT # Australian eastern daylight saving time
If that works then find you correct time zone and ask you administrators
to fix it.
--
Ken Foskey
FOSS developer
| |
| Tom Phoenix 2006-11-25, 9:58 pm |
| On 11/21/06, M=E1rio Gamito <gamito@gmail.com> wrote:
> Can someone tell me please why i'm getting this error with this code ?
>
> I'm running PERL 5.6.0 on a AIX.
If you're going to answer your own questions....?!
Seriously, when 5.6.0 was new, Bill Clinton was still President. Since
you don't even have the bugfixes of 5.6.1, you should consider
installing a much newer version of Perl.
> perl: warning: Setting locale failed.
Locale support was news back in the days of 5.6.0, and the full
documentation for this message hadn't yet made it into your copy of
perldiag. Fortunately, you can find newer documentation on the web
today:
http://search.cpan.org/~rgarcia/per...l:_warning:_Se=
tting_locale_failed.
Hope this helps!
--Tom Phoenix
Stonehenge Perl Training
|
|
|
|
|