[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Locale problem with perl



I do apologise if I have selected the wrong mailing list here

I am running Sarge on a 450 MHz Pentium III system with 300+ Meg of memory,
hoping to build something a bit more up to date soon.

I have been struggling to print to a Windows printer using CUPS. The best I
have done is to get textual Postscript from the XP-connected Epson CX5400.
Whilst tailing the error log to try to find out what is going wrong I have
noticed the commonly reported locale problem cropping up; I don't think it
has any real bearing on my printing problem but it's good to eliminate
error messages anyway.

I get (retyped)
perl: warning: Setting locale failed
perl: warning: Please check that your locale settings:
LANGUAGE = (unset)
LC_ALL = (unset)
LANG = 'en'
are supported and installed on your system

OK, I googled, read the first fifty messages and reinstalled my locales a
couple of times

I set and exported the locale settings to hopefully sensible values guided
by pod/perllocale and then set the values in /etc/environment (IIRC)

angus@mopp:~$ locale -a
C
en_GB
en_GB.iso88591
en_GB.utf8
POSIX

angus@mopp:~$ echo $LC_ALL
en_GB

angus@mopp:~$ echo $LANGUAGE
en_GB:en_GB.iso88591:en_GB.utf8

angus@mopp:~$ echo $LANG
en_GB.iso88591

I get the same results as root (as I guess you would expect)

I still get the same error messages from perl: on reflection I have had
them when 'apt-get dist-upgrade'ing since I upgraded from Woody to Sarge
three months ago.

Why does perl find LANGUAGE and LC_ALL to be unset when as far as I can see
they are set to reasonable values?

Why does perl think LANG = 'en' when I have tried en_GB and en_GB.iso88591?
Surely it isn't choking on the underscore character?

How does perl pick up the environment variables?

Thanks for any insight you can offer

Angus Mackenzie




-- 
Angus A Mackenzie           
Consultant Anaesthetist             
                                            



Reply to: