Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

[SOLVED]locale: Cannot set LC_CTYPE to default locale: No...

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
Yminus
Apprentice
Apprentice
Posts: 185
Joined: Sun Jan 06, 2008 9:06 pm

[SOLVED]locale: Cannot set LC_CTYPE to default locale: No...

  • Quote

Post by Yminus » Sat Feb 21, 2009 9:23 pm

Hello,

I tried to set the locale on my system according to the localization guide:

My /etc/env.d/02locale looks like this:

Code: Select all

LC_CTYPE="de_DE.utf8@euro"
LC_NUMERIC="de_DE.utf8@euro"
LC_TIME="de_DE.utf8@euro"
LC_COLLATE="C"
LC_MONETARY="de_DE.utf8@euro"
LC_MESSAGES="en_US.utf8@euro"
LC_PAPER="de_DE.utf8@euro"
LC_NAME="de_DE.utf8@euro"
LC_ADDRESS="de_DE.utf8@euro"
LC_TELEPHONE="de_DE.utf8@euro"
LC_MEASUREMENT="de_DE.utf8@euro"
LC_IDENTIFICATION="de_DE.utf8@euro"
#LC_ALL="de_DE.utf8@euro"
LANG="de_DE.utf8@euro"
LANGUAGE="de_DE:de:en_GB:en"
But after

Code: Select all

# env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...
I get:

Code: Select all

# 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=de_DE.utf8@euro
LC_CTYPE="de_DE.UTF-8@euro"
LC_NUMERIC="de_DE.UTF-8@euro"
LC_TIME="de_DE.UTF-8@euro"
LC_COLLATE="de_DE.UTF-8@euro"
LC_MONETARY="de_DE.UTF-8@euro"
LC_MESSAGES="de_DE.UTF-8@euro"
LC_PAPER="de_DE.UTF-8@euro"
LC_NAME="de_DE.UTF-8@euro"
LC_ADDRESS="de_DE.UTF-8@euro"
LC_TELEPHONE="de_DE.UTF-8@euro"
LC_MEASUREMENT="de_DE.UTF-8@euro"
LC_IDENTIFICATION="de_DE.UTF-8@euro"
LC_ALL=de_DE.UTF-8@euro
Now I tried generate my locale:

Code: Select all

# localedef -c -i de_DE.UTF-8@euro
Try `localedef --help' or `localedef --usage' for more information.
Does anyone know what could be wrong with my system?
Last edited by Yminus on Wed Feb 25, 2009 4:58 pm, edited 2 times in total.
Top
Yminus
Apprentice
Apprentice
Posts: 185
Joined: Sun Jan 06, 2008 9:06 pm

  • Quote

Post by Yminus » Sat Feb 21, 2009 9:55 pm

OK, I edited /etc/locale.gen so it contains these lines now

Code: Select all

en_US ISO-8859-1
en_US.UTF-8 UTF-8
en_US.utf8@euro UTF-8
de_DE ISO-8859-1
de_DE.UTF-8 UTF-8
de_DE@euro ISO-8859-15
de_DE.UTF-8@euro UTF-8
I generated the locales

Code: Select all

 # locale-gen
 * Generating 8 locales (this might take a while) with 1 jobs
 *  (1/8) Generating en_US.ISO-8859-1 ...                                                                              [ ok ]
 *  (2/8) Generating en_US.UTF-8 ...                                                                                   [ ok ]
 *  (3/8) Generating en_US.utf8.UTF-8@euro ...                                                                         [ ok ]
 *  (4/8) Generating de_DE.ISO-8859-1 ...                                                                              [ ok ]
 *  (5/8) Generating de_DE.UTF-8 ...                                                                                   [ ok ]
 *  (6/8) Generating de_DE.ISO-8859-15@euro ...                                                                        [ ok ]
 *  (7/8) Generating de_DE.UTF-8.UTF-8@euro ...                                                                        [ ok ]
 *  (8/8) Generating de_DE.utf8.UTF-8@euro ...                                                                         [ ok ]
 * Generation complete
Now after

Code: Select all

 # env-update && source /etc/profile
>>> Regenerating /etc/ld.so.cache...
I get:

Code: Select all

 # locale
LANG=de_DE.utf8@euro
LC_CTYPE="de_DE.UTF-8@euro"
LC_NUMERIC="de_DE.UTF-8@euro"
LC_TIME="de_DE.UTF-8@euro"
LC_COLLATE="de_DE.UTF-8@euro"
LC_MONETARY="de_DE.UTF-8@euro"
LC_MESSAGES="de_DE.UTF-8@euro"
LC_PAPER="de_DE.UTF-8@euro"
LC_NAME="de_DE.UTF-8@euro"
LC_ADDRESS="de_DE.UTF-8@euro"
LC_TELEPHONE="de_DE.UTF-8@euro"
LC_MEASUREMENT="de_DE.UTF-8@euro"
LC_IDENTIFICATION="de_DE.UTF-8@euro"
LC_ALL=de_DE.UTF-8@euro
No errors - good.
But although I commented out LC_ALL and set

Code: Select all

LC_COLLATE="C" 
and

Code: Select all

LC_MESSAGES="en_US.utf8@euro"
it's

Code: Select all

LC_COLLATE="de_DE.UTF-8@euro"

Code: Select all

LC_MESSAGES="de_DE.UTF-8@euro"
???
Top
Yminus
Apprentice
Apprentice
Posts: 185
Joined: Sun Jan 06, 2008 9:06 pm

locales totally messed

  • Quote

Post by Yminus » Mon Feb 23, 2009 1:04 am

OK, this is the current status:
In the console all settings are as expexcted:

Code: Select all

LANG=de_DE.utf8@euro
LC_CTYPE=de_DE.UTF-8@euro
LC_NUMERIC=de_DE.UTF-8@euro
LC_TIME=de_DE.UTF-8@euro
LC_COLLATE=C
LC_MONETARY=de_DE.UTF-8@euro
LC_MESSAGES=en_US.UTF-8@euro
LC_PAPER=de_DE.UTF-8@euro
LC_NAME=de_DE.UTF-8@euro
LC_ADDRESS=de_DE.UTF-8@euro
LC_TELEPHONE=de_DE.UTF-8@euro
LC_MEASUREMENT=de_DE.UTF-8@euro
LC_IDENTIFICATION=de_DE.UTF-8@euro
LC_ALL=
In Xterms it's:

Code: Select all

LANG=de_DE.utf8@euro
LC_CTYPE="de_DE.UTF-8@euro"
LC_NUMERIC="de_DE.UTF-8@euro"
LC_TIME="de_DE.UTF-8@euro"
LC_COLLATE="de_DE.UTF-8@euro"
LC_MONETARY="de_DE.UTF-8@euro"
LC_MESSAGES="de_DE.UTF-8@euro"
LC_PAPER="de_DE.UTF-8@euro"
LC_NAME="de_DE.UTF-8@euro"
LC_ADDRESS="de_DE.UTF-8@euro"
LC_TELEPHONE="de_DE.UTF-8@euro"
LC_MEASUREMENT="de_DE.UTF-8@euro"
LC_IDENTIFICATION="de_DE.UTF-8@euro"
LC_ALL=de_DE.UTF-8@euro
In Xterms umlauts are displayed like this: "ae" instead of "ä"
In KDE Applikations like kwrite, krusader, ... umlauts look like this:
"À" instead of "ä"
In Firefox, SciTE and other GTK Applikations umlauts are displayed correctly.

Can please someone give me some hints how to find the reason of all this mess?
Top
Yminus
Apprentice
Apprentice
Posts: 185
Joined: Sun Jan 06, 2008 9:06 pm

  • Quote

Post by Yminus » Wed Feb 25, 2009 4:57 pm

Ending this monologue.

I found out that LC_ALL has to be overwritten explicitly in /etc/env.d/02locale if it has been set once.

Code: Select all

LC_ALL=""
Steps to Reproduce:
1. Write some nonesense to LC_ALL

Code: Select all

# nano -w /etc/env.d/02locale 
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="C"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LANG="de_DE.UTF-8"
LANGUAGE="de_DE:de:en_US:en"
LC_ALL="nonesense"
And look what you've done:

Code: Select all

# env-update
>>> Regenerating /etc/ld.so.cache...
# source /etc/profile

# 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=de_DE.UTF-8
LC_CTYPE="nonesense"
LC_NUMERIC="nonesense"
LC_TIME="nonesense"
LC_COLLATE="nonesense"
LC_MONETARY="nonesense"
LC_MESSAGES="nonesense"
LC_PAPER="nonesense"
LC_NAME="nonesense"
LC_ADDRESS="nonesense"
LC_TELEPHONE="nonesense"
LC_MEASUREMENT="nonesense"
LC_IDENTIFICATION="nonesense"
LC_ALL=nonesense
2. Comment out the LC_ALL nonesense:

Code: Select all

# nano -w /etc/env.d/02locale 
LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="C"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LANG="de_DE.UTF-8"
LANGUAGE="de_DE:de:en_US:en"
#LC_ALL="nonesense"
And check that the problem remains:

Code: Select all

# env-update
>>> Regenerating /etc/ld.so.cache...
# source /etc/profile
# 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=de_DE.UTF-8
LC_CTYPE="nonesense"
LC_NUMERIC="nonesense"
LC_TIME="nonesense"
LC_COLLATE="nonesense"
LC_MONETARY="nonesense"
LC_MESSAGES="nonesense"
LC_PAPER="nonesense"
LC_NAME="nonesense"
LC_ADDRESS="nonesense"
LC_TELEPHONE="nonesense"
LC_MEASUREMENT="nonesense"
LC_IDENTIFICATION="nonesense"
LC_ALL=nonesense
3. Now set LC_ALL to the empty string:

Code: Select all

LC_CTYPE="de_DE.UTF-8"
LC_NUMERIC="de_DE.UTF-8"
LC_TIME="de_DE.UTF-8"
LC_COLLATE="C"
LC_MONETARY="de_DE.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="de_DE.UTF-8"
LC_NAME="de_DE.UTF-8"
LC_ADDRESS="de_DE.UTF-8"
LC_TELEPHONE="de_DE.UTF-8"
LC_MEASUREMENT="de_DE.UTF-8"
LC_IDENTIFICATION="de_DE.UTF-8"
LANG="de_DE.UTF-8"
LANGUAGE="de_DE:de:en_US:en"
LC_ALL=""
And the problem is gone:

Code: Select all

 # locale
LANG=de_DE.UTF-8
LC_CTYPE=de_DE.UTF-8
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE=C
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=
Top
Post Reply

4 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic