Based on Perl on Windows 7

2019-02-17 10:56发布

问题:

I installed Padre perl, perl IDE on windows 7.And every time i run a program, i am getting an error saying,

perl: warning: Setting locale failed.

perl: warning: Please check that your locale settings:

LC_ALL = (unset),

LANG = (unset)

are supported and installed on your system.

perl: warning: Falling back to the standard locale ("C").

I get outputs, but this error message is on the top of each and every output. i am tired of searching solutions for this problem,can some one tell me how to fix this problem ??

回答1:

You need to set the LC_ALL and LANG environment variables to C:

C:\>set LC_ALL=C
C:\>set LANG=C
C:\>perl x.pl 

If you want to make this permanent, or work from your IDE, go to Control Panel->System and Security->System->Advanced System Settings, and under the Advanced tab, click Environment Variables. Then, add LC_ALL and LANG to the list. You might need to restart your IDE if you make changes to these variables.