TOP POSTED SUMMARY: operator error.* An incorrect setting of LANG and LC_ALL were in /etc/profile.
They had been suggested by the guide, but were incorrectly done and override the results of all the
02locale and locale.gen things.
Now one X restart later, k3b and perl and I are all happy.
Thanks for suggesting a re-reading, Daniel.
++ kevin
On Sun, Jun 1, 2008 at 4:05 PM, Daniel Pielmeier <daniel.pielmeier@googlemail.com> wrote:
Kevin O'Gorman schrieb:
*> perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
* * * *LANGUAGE = (unset),
* * * *LC_ALL = "en_EN",
* * * *LANG = "en_EN"
* *are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Anyway, I added .utf8 to the lines in my 02locale file, and it made no
difference at all.
I don't see utf8 in any of the outputs, and k3b and perl still don't like
it.
The outputs requested (plus my 02locale file) were:
kevin@treat ~ $ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_EN
LC_CTYPE="en_EN"
LC_NUMERIC="en_EN"
LC_TIME="en_EN"
LC_COLLATE="en_EN"
LC_MONETARY="en_EN"
LC_MESSAGES="en_EN"
LC_PAPER="en_EN"
LC_NAME="en_EN"
LC_ADDRESS="en_EN"
LC_TELEPHONE="en_EN"
LC_MEASUREMENT="en_EN"
LC_IDENTIFICATION="en_EN"
LC_ALL=en_EN
kevin@treat ~ $ locale -a
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_COLLATE to default locale: No such file or directory
C
POSIX
en_US
en_US.utf8
es_MX
fr_FR
fr_FR@euro
kevin@treat ~ $ cat /etc/locale.gen
# /etc/locale.gen: list all of the locales you want to have on your system
#
# The format of each line:
# <locale> <charmap>
#
# Where <locale> is a locale located in /usr/share/i18n/locales/ and
# where <charmap> is a charmap located in /usr/share/i18n/charmaps/.
#
# All blank lines and lines starting with # are ignored.
#
# For the default list of supported combinations, see the file:
# /usr/share/i18n/SUPPORTED
#
# Whenever glibc is emerged, the locales listed here will be automatically
# rebuilt for you. *After updating this file, you can simply run
`locale-gen`
# yourself instead of re-emerging glibc.
en_US ISO-8859-1
en_US.UTF-8 UTF-8
#ja_JP.EUC-JP EUC-JP
#ja_JP.UTF-8 UTF-8
#ja_JP EUC-JP
#en_HK ISO-8859-1
#en_PH ISO-8859-1
#de_DE ISO-8859-1
#de_DE@euro ISO-8859-15
es_MX ISO-8859-1
#fa_IR UTF-8
fr_FR ISO-8859-1
fr_FR@euro ISO-8859-15
#it_IT ISO-8859-1
#pl_PL ISO-8859-15
kevin@treat ~ $ cat /etc/env.d/02locale
LANG=en_US.utf8
LC_ALL=en_us.utf8
kevin@treat ~ $
Here is my output which I guess is correct as it works fine for me!
billie@gentoo ~ $ locale
LANG=de_DE.utf8
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="de_DE.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
LC_ALL=de_DE.utf8
billie@gentoo ~ $ locale -a
C
de_DE
de_DE@euro
de_DE.utf8
en_GB
en_GB.utf8
en_US
en_US.utf8
POSIX
billie@gentoo ~ $ cat /etc/locale.gen
# /etc/locale.gen: list all of the locales you want to have on your system
#
# The format of each line:
# <locale> <charmap>
#
# Where <locale> is a locale located in /usr/share/i18n/locales/ and
# where <charmap> is a charmap located in /usr/share/i18n/charmaps/.
#
# All blank lines and lines starting with # are ignored.
#
# For the default list of supported combinations, see the file:
# /usr/share/i18n/SUPPORTED
#
# Whenever glibc is emerged, the locales listed here will be automatically
# rebuilt for you. *After updating this file, you can simply run `locale-gen`
# yourself instead of re-emerging glibc.
en_US.UTF-8 UTF-8
en_US ISO-8859-1
en_GB.UTF-8 UTF-8
en_GB ISO-8859-1
de_DE.UTF-8 UTF-8
de_DE ISO-8859-1
de_DE@euro ISO-8859-15
billie@gentoo ~ $ cat /etc/env.d/02locale
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
GDM_LANG="de_DE.utf8"
LC_CTYPE="de_DE.utf8"
LC_NUMERIC="de_DE.utf8"
LC_TIME="de_DE.utf8"
LC_COLLATE="de_DE.utf8"
LC_MONETARY="de_DE.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="de_DE.utf8"
LC_NAME="de_DE.utf8"
LC_ADDRESS="de_DE.utf8"
LC_TELEPHONE="de_DE.utf8"
LC_MEASUREMENT="de_DE.utf8"
LC_IDENTIFICATION="de_DE.utf8"
Maybe locale-gen is not working properly at your system as perl says the locales are not installed. What are the contents of /usr/lib/locale/?
I am guessing this as your "locale" output looks really weird. It does not show the ".utf8" parts. And en_EN also looks strange as it is not a valid locale. It should be for instance LANG=en_US.utf8 like in 02locale. Plus the error messages of missing directories for LC_CTYPE LC_MESSAGES and LC_COLLATE.
Your settings in locale.gen and 02locale look correct. Could it be possible that your perl scripts or any other home brewed things are messing this up!
Regards,
Daniel
--
gentoo-user@lists.gentoo.org mailing list
--
Kevin O'Gorman, PhD
06-02-2008, 01:23 PM
"Kevin O'Gorman"
K3b complains about my locale (SOLVED)
On Sun, Jun 1, 2008 at 6:45 PM, b.n. <brullonulla@gmail.com> wrote:
Kevin O'Gorman ha scritto:
TOP POSTED SUMMARY: operator error. *An incorrect setting of LANG and LC_ALL were in /etc/profile.
They had been suggested by the guide, but were incorrectly done and override the results of all the
02locale and locale.gen things.
Now one X restart later, k3b and perl and I are all happy.
Thanks for suggesting a re-reading, Daniel.
Could you please provide the solution? I have the same problem and the thread is all but clear to me.
In my case, the solution was to remove the (incorrect) LANG and LC_ALL assignments I had edited into
/etc/profile.* The 02locale and locale.gen files did the job correctly.
I tracked this down by putting a lot of debugging stuff in the various shell startup files.* They looked like this:
[ -e /etc/conf.d/D ] && echo This is /etc/profile; LANG is $LANG; LC_ALL is $LC_ALL
...
[ -e /etc/conf.d/D ] && echo End of /etc/profile; LANG is $LANG; LC_ALL is $LC_ALL
And I can switch them on and off by creating/rm-ing /etc/conf.d/D.* This showed me where the variables
were getting values, and what the values were.* By the time I was done, I had them in
~/.bashrc
~/.mybashrc (you may or may not have this file)
~/.bash_profile
/etc/profile
/etc/bash/bashrc
They are still there, but inactive since I have deleted /etc/conf.d/D (a file of my own creation).* If you don't use
bash, you'll have to design your own variant of this approach.