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

Re: Locale Problem

On Wed, Nov 14, 2007 at 05:58:26 -0800, Jeff Grossman wrote:
> Kumar Appaiah wrote:
>> On Tue, Nov 13, 2007 at 09:18:49PM -0800, Jeff Grossman wrote:
>>> I get the following error messages whenever I update or install a program 
>>> with aptitude:
>>> perl: warning: Setting locale failed.
>>> perl: warning: Please check that your locale settings:
>> [snip]
>> The simplest thing would be to set export LANG=en_US (or similar) in
>> your bashrc. But the proper way would be to run dpkg-reconfigure
>> locales and choose only the locales you are intersted in and set the
>> right default locale.
>> HTH.
>> Kumar
> I have run the "dpkg-reconfigure locales" command numerous times.  Here is 
> the output of my /etc/locale.gen file:
> root@apple /etc # less locale.gen
> # This file lists locales that you wish to have built. You can find a list
> # of valid supported locales at /usr/share/i18n/SUPPORTED. Other
> # combinations are possible, but may not be well tested. If you change
> # this file, you need to rerun locale-gen.
> #
> en_US.UTF-8 UTF-8
> en_US ISO-8859-1
> en_US.ISO-8859-15 ISO-8859-15
> root@apple /etc #
> And, here is what I have in my bash.bashrc file:
> export LC_ALL="en_US.UTF-8 UTF-8"

I think that should be

export LC_ALL="en_US.UTF-8"

> export LANG="en_US"
> export LANGUAGE="en_US"
> And, I get the error about the missing locale files.  If I change the 
> "export LC_ALL="en_US.UTF-8 UTF-8" to "export LC_ALL="en_US" then I do not 
> get the error from Perl.  But, I do get the following output when I run 
> 'aptitude update' which seems weird to me:
> Get:1 http://ftp.us.debian.org stable Release.gpg [378B]
> Ign http://ftp.us.debian.org stable/main Translation-en_US
> Ign http://ftp.us.debian.org stable/contrib Translation-en_US
> What seems weird to me is the "Translation-en_US" part.  I don't have that 
> output if I use hte UTF-8 version of the locale.
> I guess one of my main questions is, what LC_ALL, LANG, and LANGUAGE 
> settings do I use for US/English?

AFAIK, it should be either "en_US" if you want to use ISO-8859-1
encoding, en_US.ISO-8859-15 for ISO-8859-15, or en_US.UTF-8 for UTF-8.
Just setting LC_ALL should be enough since it forces all the other LC_*
variables and LANG to the same value. (You can check by running
"locale".) I don't think LANGUAGE is needed at all, LANG determines the
language of your localized messages.

Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |

Reply to: