Subject: Re: perl and locale
To: Martin Schmitz <martin-schmitz@web.de>
From: Shigeki UNO <shigeki@mediawars.ne.jp>
List: netbsd-help
Date: 06/09/2003 00:54:53
Martin Schmitz <martin-schmitz@web.de> writes:

> Whenever I use perl, I get the warning:
> ,----
> | perl: warning: Setting locale failed.
> | perl: warning: Please check that your locale settings:
> |         LC_ALL = (unset),
> |         LC_MESSAGES = "C",
> |         LANG = "de_DE.ISO8859-1"
> |     are supported and installed on your system.
> | perl: warning: Falling back to the standard locale ("C").
> `----
>
> The mentioned setting is correct. The files under
> /usr/share/locale exists as well as under /usr/pkg/share/locale. Other
> applications make use of it (if I unset LC_MESSAGES I get german error
> messages from 'ls' for example). The section describing this warning in
> perldoc perllocale doesn't help. As far as I can see, the system is set
> up correctly.
>
> I am using Perl 5.8.0. And I get this warning whenever any of the
> localisation variables is set to an other value as "C".
>
> Does anyone know how to get rid of this annoying warning besides setting
> PERL_BADLANG?

(t)csh:
setenv LANG C
setenv LC_CTYPE de_DE.ISO8859-1
setenv LC_MESSAGE de_DE.ISO8859-1

_I'm sure of it_. To make sure I tested it like this. In my case, I've
been setting them up in ${HOME}/.cshrc.

setenv LANG C
setenv LC_CTYPE ja_JP.eucJP
setenv LC_MESSAGE ja_JP.eucJP

And then I wrote *hello.pl*.

        print "Hello World!\n";

The following was the result.

nana > perl hello.pl
Hello World!
nana > 

HTH,
---
Shigeki UNO