You are not logged in.

#1 2012-01-31 10:20:54

mibadt
Member
Registered: 2009-09-25
Posts: 362

locale problems

Hi,
I'm on a fresh installed Arch-X86_64/KDE.
In order to maintain the main English (US) language, and add (initially missing) capability to display file names in Hebrew as well I:

1. Created a /etc/locale.gen file (didn't exist initially) with:


#en_US ISO-8859-1
en_US.UTF-8
#he_IL.UTF-8    UTF-8
#he_IL    ISO-8859-8

2. As root, ran locale-gen and rebooted.

Now, I get the desired Hebrew file names, yet, running local yields some errors (see below).

How can I fix this?

Thanks

-----------output of locale-----------

$ 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_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=


Best regards,
Michael Badt

Offline

#2 2012-01-31 11:46:19

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

Re: locale problems

Please post the output of 'locale -a'.


When pasting code, please use [ code ] tags https://bbs.archlinux.org/help.php#bbcode

like this

Offline

#3 2012-01-31 12:15:53

petter
Member
From: Sandvika, Norway
Registered: 2009-11-01
Posts: 8

Re: locale problems

My locale.gen has an extra field, UTF-8, like so:

en_US.UTF-8 UTF-8

You might want to try adding this and rerun locale-gen.

Offline

#4 2012-01-31 14:34:49

mibadt
Member
Registered: 2009-09-25
Posts: 362

Re: locale problems

Thank the two of you.
I've:
1. Modified my /etc/locale.gen to include only the following single line:

 en_US.UTF-8 UTF-8 #

2. Rerun locale-gen as root
3. Rebooted

After reboot, same as before above changes, running locale -a yields the following:

  
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

Any idea?


Best regards,
Michael Badt

Offline

#5 2012-01-31 14:39:13

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

Re: locale problems

Try setting your LC_ALL= or exporting the "missing settings"
https://bbs.archlinux.org/viewtopic.php … 2#p1014462
https://bbs.archlinux.org/viewtopic.php … 6#p1020226


What's the output of 'locale -a'?

Offline

#6 2012-01-31 15:21:56

mibadt
Member
Registered: 2009-09-25
Posts: 362

Re: locale problems

Still problems.
I've:
1. Added the following to my ~/.bashrc

#export LANG=en_US.UTF-8
export LC_CTYPE="en_US.utf8"
export LC_COLLATE="C"
export LC_MESSAGES="en_US.utf8"

2. Rebooted
3. As root, ran locale-gen.

Upon opening my terminal, I got the following lines:

bash: warning: setlocale: LC_CTYPE: cannot change locale (en_US.utf8): No such file or directory
bash: warning: setlocale: LC_MESSAGES: cannot change locale (en_US.utf8): No such file or directory

Running locale -a yielded in:

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
C
POSIX

What am I doing wrong?

Thanks


Best regards,
Michael Badt

Offline

#7 2012-01-31 15:27:02

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,045

Re: locale problems

mibadt wrote:

1. Created a /etc/locale.gen file (didn't exist initially) with:

I'm surprised nobody asked about that, because that file has to exist:

/etc/locale.gen is owned by glibc 2.15-4

How did you install?
Did you run 'pacman -Syu' already?
Also try reinstalling glibc.
Do you have a /etc/profile.d/locale.sh?


1000

Offline

#8 2012-01-31 15:48:46

mibadt
Member
Registered: 2009-09-25
Posts: 362

Re: locale problems

I did a net install from a CD.
Yes, since then, I've done a few times 'pacman -Syu'.
I did have a locale.sh, but glibc was NOT installed.

However, after installing glibc and rebooting, I still get the same outcome, both when opening a terminal and when running locale-a.
Any more ideas?


Best regards,
Michael Badt

Offline

#9 2012-01-31 15:54:11

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

Re: locale problems

mibadt wrote:

I did have a locale.sh, but glibc was NOT installed.

I'm not sure how could this be possible, it's needed for a lot of basic apps like pacman, bash, coreutils etc.

Last edited by karol (2012-01-31 15:55:54)

Offline

#10 2012-01-31 15:55:38

mibadt
Member
Registered: 2009-09-25
Posts: 362

Re: locale problems

Indeed looks weird.
Anyway, I have to fly abroad now for two weeks.

Thanks  for all the help


Best regards,
Michael Badt

Offline

#11 2012-01-31 15:57:36

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

Re: locale problems

Have you tried using en_US.UTF-8 (capital letters and a dash) instead of en_US.utf8?

Offline

#12 2012-01-31 16:37:37

bohoomil
Member
Registered: 2010-09-04
Posts: 2,376
Website

Re: locale problems

As we're all trying, let me try, too. Put only the following content to your locale.gen:

en_US.UTF-8 UTF-8  
en_US ISO-8859-1

-- just as I typed it, and then run 'sudo locale-gen'. This should provide your system with the fallback iso encoding just in case some nasty vicious app needs it.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#13 2012-02-01 00:50:06

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,045

Re: locale problems

LOCALE from /etc/rc.conf would have been interesting as well ...


1000

Offline

#14 2012-02-05 01:14:03

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,661

Re: locale problems

Isn't this also odd:

#en_US ISO-8859-1
en_US.UTF-8
#he_IL.UTF-8    UTF-8
#he_IL    ISO-8859-8

The OP said that this yielded Hebrew file names but the only relevant line there looks to be the US English line - the rest are commented out. I've got tons of locales listed in locale.gen but only those I've uncommented are available to the system.

Was the custom locale.gen replaced by glibc's default version and locales regenerated after glibc was installed?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#15 2012-04-19 02:23:43

ramjr
Member
Registered: 2012-01-15
Posts: 2

Re: locale problems

Hello,

I have also been experiencing locale problems.  I've taken a look at all file contents, re-installed glibc, all with no impact.  Below, I've included contents of relevant files, copy and pasted from the files.

rc.conf:
LOCALE="en_US.UTF-8"
DAEMON_LOCALE="yes"

locale.gen:
en_US.UTF-8 UTF-8  
en_US ISO-8859-1

re-install of glibc:
(1/1) upgrading glibc                              [######################] 100%
Generating locales...
  en_US.UTF-8... done
  en_US.ISO-8859-1... done
Generation complete.

So I did some additional investigation. 

/etc/locale.gen

mentions

/usr/share/i18n/locales

and

/usr/share/i18n/charmaps

So I took a look at their contents:

cd /usr/share/i18n/charmaps
ls  UT*
UTF-8.gz
cd ../locales
ls en_U*
en_US

I do not see a file named

en_US.UTF*

  Should there be?

Offline

#16 2012-04-19 05:21:33

ramjr
Member
Registered: 2012-01-15
Posts: 2

Re: locale problems

Well, I did nothing but everything seems to be fine.  I have no idea why.

I had rebooted after re-installing glibc and the problem persisted.

I shutdown a second time, returned home, booted and everything is "fixed".

Sorry about the noise.

Offline

Board footer

Powered by FluxBB