Send As SMS

Tuesday, November 14, 2006

perl: warning: Setting locale failed.

{{ Another "I've fixed this before, but had trouble remembering how, so here it is for posterity" post. }}

I periodically encounter this, particularly in chroots:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = "en_AU:en_US:en",
LC_ALL = (unset),
LANG = "en_AU"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
The cause is that /etc/environment contains:
The fix is to run
# dpkg-reconfigure locales
and to turn on some useful locales (en_(AU|GB|US) with various UTF-8/8859-1/8859-15 character sets in my case).