Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
PBM: glibc-2.11 - all locale names are unknown!
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5060
Location: Dark side of the mood

PostPosted: Sat Jul 17, 2010 8:43 am    Post subject: PBM: glibc-2.11 - all locale names are unknown! Reply with quote

Hi all.

I've just upgraded to glibc-2.11.2 and now none of my locales seems known:
locale POSIX:
locale: unknown name "POSIX"

locale fr_BE:
locale: unknown name "fr_BE"

locale fr_BE.utf8:
locale: unknown name "fr_BE.utf8"

locale fr_BE.UTF-8:
locale: unknown name "fr_BE.UTF-8"

I also got these warnings while compiling glibc:
Code:
[sys-libs/glibc-2.11.2] bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/var/tmp/portage/sys-libs/glibc-2.11.2/temp/environment: line 89: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/var/tmp/portage/sys-libs/glibc-2.11.2/temp/environment: line 89: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

Here's my locale.gen file:
Code:
en_GB ISO-8859-1
en_GB.ISO-8859-15 ISO-8859-15
#en_GB.utf8 UTF-8
en_GB.UTF-8 UTF-8
en_US ISO-8859-1
en_US.ISO-8859-15 ISO-8859-15
#en_US.utf8 UTF-8
en_US.UTF-8 UTF-8
fr_BE ISO-8859-1
#fr_BE.utf8 UTF-8
fr_BE.UTF-8 UTF-8
fr_BE@euro ISO-8859-15
fr_FR ISO-8859-1
#fr_FR.utf8 UTF-8
fr_FR.UTF-8 UTF-8
fr_FR@euro ISO-8859-15

I have just added the lines with «.UTF-8» as it's how they appear on Debian (glibc-2.7). I also have a locale file, /etc/env.d/02locale that says:
Code:
# For PostgreSQL initial configuration:
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"

LC_CTYPE="fr_BE.UTF-8"
LC_TIME="fr_BE.UTF-8"
LC_MONETARY="fr_BE.UTF-8"
LC_COLLATE="fr_BE.UTF-8"
LC_TELEPHONE="fr_BE.UTF-8"

This has worked up until I upgraded glibc to version 2.11 :( . Weirdly enough these locales seem yet available:
locale -a:
C
en_GB
en_GB.iso88591
en_GB.iso885915
en_GB.utf8
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
fran�ais
fr_BE
fr_BE@euro
fr_BE.iso88591
fr_BE.iso885915@euro
fr_BE.utf8
french
fr_FR
fr_FR@euro
fr_FR.iso88591
fr_FR.iso885915@euro
fr_FR.utf8
POSIX

Note I don't know why «fran�ais» appears this ways as I have installed several Debian servers and that particular locale appears as «français». What I find weird is that it's «fran�ais» on all Gentoo machines I ever configured, which suggests I do have a locale problem.

Fact is I don't know how to fix it.

Thanks a lot for any hint or suggestion.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Jaglover
Watchman
Watchman


Joined: 29 May 2005
Posts: 7512
Location: Saint Amant, Acadiana

PostPosted: Sun Jul 18, 2010 12:42 am    Post subject: Reply with quote

OK, nobody is responding ... what happens when you run locale-gen?
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5060
Location: Dark side of the mood

PostPosted: Sun Jul 18, 2010 1:21 pm    Post subject: Reply with quote

I've run locale-gen, of course, run env-update && source /etc/profile, as usual. The issue with unknown locales isn't fixed. That is why I posted here. Strangely enough, that is 2.11 specific as my other Gentoo machine (which lists «fran�ais» instead of «français», like Debian) has glibc 2.10 and doesn't exhibit that issue.

I have recompiled glibc twice now. I don't get the error message (setlocale: LC_ALL: cannot change locale (en_US.UTF-8 ) ) during compile time anymore. My locales seem to work (i.e. nano window appears in french if I set LC_ALL to fr_BE.UTF-8) but the locale command doesn't work as expected with a valid locale argument.

BTW I've seen at least two distinct ways to setup /etc/locale.gen. Should we write, for instance "fr_BE.utf8 UTF-8" or "fr_BE.UTF-8 UTF-8"? How can we figure out which one? The only thing I'm certain is Debian uses the latter.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
USTruck
Guru
Guru


Joined: 21 Aug 2005
Posts: 423
Location: La Louviere (Belgique)

PostPosted: Sun Jul 18, 2010 1:48 pm    Post subject: Reply with quote

Hello,

I don't have any problem with my locale but different settings

Make.conf : LINGUAS="fr"

/etc/env.d/02locale : LANG="fr_BE.utf8"


/etc/locale.gen
en_US ISO-8859-1
en_US.UTF-8 UTF-8
fr_BE ISO-8859-1
fr_BE@euro ISO-8859-15
fr_BE.UTF-8 UTF-8

Kernel config :

CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
CONFIG_NLS_CODEPAGE_850=y
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
CONFIG_NLS_ISO8859_15=y
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
CONFIG_NLS_UTF8=y

Can you verify : eselect python list (default 2.6 NOT 3.1)
This solve your problem ?
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5060
Location: Dark side of the mood

PostPosted: Sun Jul 18, 2010 2:00 pm    Post subject: Reply with quote

@USTruck

Reading your post I no longer understand anything at all to localization in UNIX :( . There's a mix between keywords spelling "utf8" and "UTF-8" but when the Hell do I know where/when/why to use which of these? Shouldn't you use either "utf8" or "UTF-8" all over the place, i.e. in /etc/locale.gen AND /etc/env.d/02locale ?

EDIT: To answer your question
zegrep '^CONFIG_NLS' /proc/config.gz:
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_CODEPAGE_850=y
CONFIG_NLS_CODEPAGE_1250=y
CONFIG_NLS_ASCII=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_ISO8859_15=y
CONFIG_NLS_UTF8=y

eselect python list:
Available Python interpreters:
  [1]   python2.6 *

In all cases, locale <any locale> returns «locale: unknown name: ["..."]».
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
USTruck
Guru
Guru


Joined: 21 Aug 2005
Posts: 423
Location: La Louviere (Belgique)

PostPosted: Sun Jul 18, 2010 2:22 pm    Post subject: Reply with quote

Hello

About utf8 and UTF-8 : between settings of my station (learning), I find that to set (locale.gen) a usage are "UTF-8" and to use it (02locale) a correct set are "utf8" (why ????)

But to see what locale are used type : locale
like :
Code:
alien@alien  $ locale
LANG=fr_BE.utf8
LC_CTYPE="fr_BE.utf8"
LC_NUMERIC="fr_BE.utf8"
LC_TIME="fr_BE.utf8"
LC_COLLATE="fr_BE.utf8"
LC_MONETARY="fr_BE.utf8"
LC_MESSAGES="fr_BE.utf8"
LC_PAPER="fr_BE.utf8"
LC_NAME="fr_BE.utf8"
LC_ADDRESS="fr_BE.utf8"
LC_TELEPHONE="fr_BE.utf8"
LC_MEASUREMENT="fr_BE.utf8"
LC_IDENTIFICATION="fr_BE.utf8"
LC_ALL=


Too see all installed locale : locale -a

Under my station when I use your exemple

Code:
alien@alien $ locale fr_BE.utf8
locale: unknown name "fr_BE.utf8"
alien@alien $ locale fr_BE.UTF-8
locale: unknown name "fr_BE.UTF-8"


I have exactly same error
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5060
Location: Dark side of the mood

PostPosted: Sun Jul 18, 2010 2:25 pm    Post subject: Reply with quote

Ah, I feel less lonely at once :D .

Do you have the same error with "C", "POSIX" ?
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
USTruck
Guru
Guru


Joined: 21 Aug 2005
Posts: 423
Location: La Louviere (Belgique)

PostPosted: Sun Jul 18, 2010 2:34 pm    Post subject: Reply with quote

Yes with your exemple NO with my

locale -a | grep POSIX
locale -a | grep C
Back to top
View user's profile Send private message
USTruck
Guru
Guru


Joined: 21 Aug 2005
Posts: 423
Location: La Louviere (Belgique)

PostPosted: Sun Jul 18, 2010 2:39 pm    Post subject: Reply with quote

ATTENTION : I find some information about UTF settings (I research source to provide)

DO NOT SET LC_ALL, only LANG under 02locale
Back to top
View user's profile Send private message
VinzC
Watchman
Watchman


Joined: 17 Apr 2004
Posts: 5060
Location: Dark side of the mood

PostPosted: Sun Jul 18, 2010 5:28 pm    Post subject: Reply with quote

USTruck wrote:
Yes with your exemple NO with my

locale -a | grep POSIX
locale -a | grep C

Maybe it's just not a problem after all... With <glibc-2.11, there's no output from the locale command when passing it a locale name. With 2.11 it outputs a message. Now I really wonder what is supposed to be passed as the <name> argument...
man locale:
...
NAME
       locale - get locale-specific information

SYNOPSIS
       locale [-a| -m]

       locale [-ck] name...
...
OPERANDS
       The following operand shall be supported:

       name   The  name  of a locale category as defined in the Base Definitions volume of
              IEEE Std 1003.1-2001, Chapter 7, Locale, the name of a keyword in  a  locale
              category,  or the reserved name charmap. The named category or keyword shall
              be selected for output. If a single name represents both a  locale  category
              name  and a keyword name in the current locale, the results are unspecified.
              Otherwise, both category and keyword names can be specified  as  name  oper‐
              ands, in any sequence. It is implementation-defined whether any keyword val‐
              ues are written for the categories LC_CTYPE and LC_COLLATE.

Heck, fr_BE or fr_BE.UTF-8 are locale names, right?

USTruck wrote:
ATTENTION : I find some information about UTF settings (I research source to provide)

DO NOT SET LC_ALL, only LANG under 02locale

Yes, I already fixed that.
_________________
Gentoo addict: tomorrow I quit, I promise!... Just one more emerge...
1739!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum