You are not logged in.

#1 2012-03-11 08:37:03

Mulix
Member
Registered: 2012-03-11
Posts: 6

Locale problems

Hello, everyone. In advance, sorry about my English.

$ uname -a
Linux mulix_laptop 3.2.9-1-ARCH #1 SMP PREEMPT Thu Mar 1 09:31:13 CET 2012 x86_64 Intel(R) Core(TM)2 Duo CPU T6570 @ 2.10GHz GenuineIntel GNU/Linux
 

I am having some problems with the locale. System locale should be ru_RU.utf-8. Cyrillyc symbols are shown at terminal as '?'  "locale -a" keeps giving me an error:

[mulx@mulix_laptop ~]$ 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.utf8
ru
ru_RU.utf8

My rc.conf:

...
KEYMAP="ru"
CONSOLEFONT="ter-v16n"
CONSOLEMAP=
LOCALE="ru_RU.utf-8"
DAEMON_LOCALE="yes"
USECOLOR="yes"
...

In locale.gen uncommented

...
en_US.UTF-8 UTF-8
...
ru_RU.UTF-8 UTF-8
....

locale-gen runs OK

$ sudo locale-gen
Generating locales...
  en_US.UTF-8... done
  ru_RU.UTF-8... done
Generation complete.

I have tried this, and

localedef --no-archive -c -i ru_RU -f UTF-8 ru_RU.utf-8 

Nothing helps, still getting this error.
Any ideas on where I am being stupid? Thanks in advance.

Last edited by Mulix (2012-03-11 08:38:29)

Offline

#2 2012-03-11 09:09:29

Gcool
Member
Registered: 2011-08-16
Posts: 1,456

Re: Locale problems

Could it possibly be related to this? In wich case running the following should fix it:

# rm /etc/profile.d/locale.sh
# pacman -Syu initscripts

Burninate!

Offline

#3 2012-03-11 09:48:54

Mulix
Member
Registered: 2012-03-11
Posts: 6

Re: Locale problems

Gcool wrote:

Could it possibly be related to this? In wich case running the following should fix it:

# rm /etc/profile.d/locale.sh
# pacman -Syu initscripts

Nope, dont seem to work. sad Backuped locale.sh, reinstalled fresh initscripts. The locale.sh file was OK:

[mulx@mulix_laptop ~]$ diff /etc/profile.d/locale.sh /etc/profile.d/locale.bak 
[mulx@mulix_laptop ~]$

But it seem to revert all the stuff i was trying:

[mulx@mulix_laptop ~]$ 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.utf8
ru_RU.utf8

Also, i dont have a /etc/locale.conf file... I dont really understand when it should be generated.

Last edited by Mulix (2012-03-11 09:52:53)

Offline

#4 2012-03-11 11:22:57

Stemp
Member
From: Paris, Europe
Registered: 2011-04-26
Posts: 61
Website

Re: Locale problems

In your rc.conf the LOCALE is set to ru_RU.utf-8 but locale-gen generate ru_RU.UTF-8 ?


Sorry for my English - Home Page - «Violence never settles anything.» : Genghis Khan, 1162-1227

Offline

#5 2012-03-11 11:38:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Locale problems

Do you have consolefont hook in your mkinitcpio.conf's HOOKS?

[karol@black ~]$ grep consolefont /etc/mkinitcpio.conf 
HOOKS="base udev autodetect fsck pata scsi sata filesystems consolefont"

Offline

#6 2012-03-11 12:33:38

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Locale problems

LOCALE="ru_RU.utf-8" -> LOCALE="ru_RU.utf8"


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#7 2012-03-12 08:40:01

Mulix
Member
Registered: 2012-03-11
Posts: 6

Re: Locale problems

Stemp wrote:

In your rc.conf the LOCALE is set to ru_RU.utf-8 but loc    ale-gen generate ru_RU.UTF-8
?

This was the first thing I have tried to change. Actualy I put an uppercase version first. The same goes for ru_RU.utf8 without '-'. In locale.gen file it is "ru_RU.UTF-8", so i think it is right.

karol wrote:

Do you have consolefont hook in your mkinitcpio.conf's HOOKS?

[karol@black ~]$ grep consolefont /etc/mkinitcpio.conf
HOOKS="base udev autodetect fsck pata scsi sata filesystems consolefont"

Nope, there was no hook. Added it, but it seems it didnt change anything...  Also, while booting the font loads OK.   sad

So, still the same error. I kinda have a feeling that I am beeing incredibly stupid somewhere, but i can't  figure where exactly... Really strange stuff:

[mulx@mulix_laptop ~]$ sudo locale-gen
Password:
Generating locales...
  en_US.UTF-8... done
  ru_RU.UTF-8... done <<<<<<<<<<
Generation complete.
[mulx@mulix_laptop ~]$ 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.utf8
ru_RU.utf8  <<<<<<<<<<<

And yes, i rebooted the system. ( BTW should I reboot or I can just kill Xorg and relogin at gdm? )

UPDATE:

I have added locale setting to ~/.bashrc

... 
export LANG="ru_RU.utf8"

The error disappeared, but now terminal is messed up, and it is, of course, not system-wide solution.

Last edited by Mulix (2012-03-12 09:15:00)

Offline

#8 2012-03-12 11:23:40

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Locale problems

Mulix wrote:
Stemp wrote:

I have added locale setting to ~/.bashrc

... 
export LANG="ru_RU.utf8"

The error disappeared, but now terminal is messed up, and it is, of course, not system-wide solution.

Exporting usually fixes this:
* https://bbs.archlinux.org/viewtopic.php … 2#p1014462
* https://bbs.archlinux.org/viewtopic.php … 6#p1020226
* https://bbs.archlinux.org/viewtopic.php?id=134764

You can use /etc/bash.bashrc.local for system-wide effect.



What do you mean by "terminal is messed up"?

Offline

#9 2012-03-12 14:45:11

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Locale problems

Mulix wrote:

UPDATE:

I have added locale setting to ~/.bashrc

... 
export LANG="ru_RU.utf8"

The error disappeared, but now terminal is messed up, and it is, of course, not system-wide solution.

Mr.Elendig wrote:

LOCALE="ru_RU.utf-8" -> LOCALE="ru_RU.utf8"

In rc.conf

Just how is the terminal messed up btw? All apps are speaking russian to you instead of english?


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#10 2012-03-12 18:19:44

Mulix
Member
Registered: 2012-03-11
Posts: 6

Re: Locale problems

karol wrote:

It helped, thank you and everyone else on this thread. Though, it is strange that rc.conf way was not working right...

karol wrote:

What do you mean by "terminal is messed up"?

Mr.Elendig wrote:

Just how is the terminal messed up btw? All apps are speaking russian to you instead of english?

Some of the text ( for example sudo output ) is printed with wierd question mark characters, vim is completely unoperational etc. I am writing from the other computer right now, so I cant give you a list.

Btw, offtopic. It is a little late but, happy birthday Arch. Just learned about it smile

Offline

#11 2012-03-13 10:05:54

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: Locale problems

Mulix wrote:

It helped, thank you and everyone else on this thread. Though, it is strange that rc.conf way was not working right...

It didn't work because, as I have pointed out a few times now, you had a typo in the locale.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#12 2012-03-13 17:14:57

Mulix
Member
Registered: 2012-03-11
Posts: 6

Re: Locale problems

Mr.Elendig wrote:
Mulix wrote:

It helped, thank you and everyone else on this thread. Though, it is strange that rc.conf way was not working right...

It didn't work because, as I have pointed out a few times now, you had a typo in the locale.

And as I pointed several times, i have tried all the variants, and it still didn't work. I think we should drop this topic, solution is found.

Offline

Board footer

Powered by FluxBB