You are not logged in.

#1 2015-07-24 19:51:52

dancer69
Banned
Registered: 2011-08-05
Posts: 66

[Solved]Cannot set locale correct

I have some locale problems and unicode characters appear as ????? in terminals and in lightdm login screen. Also I get the following error about locale when I'm installing a package.

bsdtar failed to set default locale

Here is "locale -a" output:

C
el_GR
el_GR@euro
el_GR.iso88597
el_GR.iso88597@euro
el_GR.utf8
en_US.utf8
greek
POSIX

and here the "strace -e file locale":

execve("/usr/bin/locale", ["locale"], [/* 18 vars */]) = 0
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/el_gr.UTF-8/LC_MONETARY", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/el_gr.utf8/LC_MONETARY", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/el_gr/LC_MONETARY", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/el.UTF-8/LC_MONETARY", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/el.utf8/LC_MONETARY", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/locale/el/LC_MONETARY", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/el_GR.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/el_GR/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/el.utf8/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/el/LC_MESSAGES/libc.mo", O_RDONLY) = 3
locale: Cannot set LC_ALL to default localeopen("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/gconv/gconv-modules", O_RDONLY|O_CLOEXEC) = 3
:      
LANG=el_GR.utf8
LC_CTYPE="el_GR.utf8"
LC_NUMERIC=el_gr.UTF-8
LC_TIME=el_gr.UTF-8
LC_COLLATE="el_GR.utf8"
LC_MONETARY=el_gr.UTF-8
LC_MESSAGES="el_GR.utf8"
LC_PAPER="el_GR.utf8"
LC_NAME="el_GR.utf8"
LC_ADDRESS="el_GR.utf8"
LC_TELEPHONE="el_GR.utf8"
LC_MEASUREMENT="el_GR.utf8"
LC_IDENTIFICATION="el_GR.utf8"
LC_ALL=
+++ exited with 0 +++

Last edited by dancer69 (2015-07-25 10:09:20)

Offline

#2 2015-07-24 19:55:22

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [Solved]Cannot set locale correct

What's in your /etc/locale.conf ?

Offline

#3 2015-07-24 19:57:54

dancer69
Banned
Registered: 2011-08-05
Posts: 66

Re: [Solved]Cannot set locale correct

locale.conf

LANG=el_GR.UTF-8
LC_NUMERIC=el_gr.UTF-8
LC_TIME=el_gr.UTF-8
LC_MONETARY=el_gr.UTF-8
LC_PAPER=el_gr.UTF-8
LC_MEASUREMENT=el_gr.UTF-8
LC_MESSAGES=el_gr.UTF-8

Last edited by dancer69 (2015-07-24 19:59:47)

Offline

#4 2015-07-24 20:07:29

DarkCerberus
Banned
From: Holsworthy, Devon
Registered: 2011-12-31
Posts: 252

Re: [Solved]Cannot set locale correct

Hello, please remove your locale.conf file and use /etc/locale.gen and then in that file select the language you want to use e.g en_GB or el_GR you should have two of those in the file then after that use locale-gen command line tool which will generate the locale properly...

Note: You do not need the locale.conf file - as locale-gen does it correctly for you....


Our enemies are your enemies, Nick. Disorder, war. It's just a matter of time before a dirty bomb goes off in Moscow, or an EMP fries Chicago.  ---  Alexander Pierce, Captain America: Winter Soldier
Access Denied! De-cryption failed, override denied all files sealed! --- Triskelion, Shield OS
-----
How to ask questions the smart way

Offline

#5 2015-07-24 20:13:34

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [Solved]Cannot set locale correct

@DarkCerberus Huh? The locale-gen tool generates the locales - you still need to specify the locale in /etc/locale.conf so I have no idea what you're on about there.

@dancer69 I think I've figured out the problem. In /etc/locale.conf change all the el_gr.UTF-8 instances to el_GR.UTF-8

Offline

#6 2015-07-24 20:14:31

dancer69
Banned
Registered: 2011-08-05
Posts: 66

Re: [Solved]Cannot set locale correct

I did it but result is the same. I have 3 el_GR entries. This time I choose only the el_GR.UTF8 and I commented out the others. But nothing change.

Offline

#7 2015-07-24 20:16:29

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [Solved]Cannot set locale correct

Log out and in again.

Offline

#8 2015-07-24 20:17:52

dancer69
Banned
Registered: 2011-08-05
Posts: 66

Re: [Solved]Cannot set locale correct

Yes I did it, same problem.

Offline

#9 2015-07-24 20:25:42

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [Solved]Cannot set locale correct

Hmmm not sure then, sorry. You could try removing /etc/locale.conf as per what DarkCerberus said. I don't see why that would be the problem though.

Offline

#10 2015-07-24 20:31:42

dancer69
Banned
Registered: 2011-08-05
Posts: 66

Re: [Solved]Cannot set locale correct

I did that, it doesn't make any difference. locale.gen recreate it.

Offline

#11 2015-07-24 22:34:15

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [Solved]Cannot set locale correct

Try this:

# localectl set-locale LANG=el_GR.UTF-8
# locale-gen
LANG= source /etc/profile.d/locale.sh

If this doesn't work, check for any user-specific configuration files:

cat ~/.config/locale.conf

Offline

#12 2015-07-25 10:08:51

dancer69
Banned
Registered: 2011-08-05
Posts: 66

Re: [Solved]Cannot set locale correct

I removed locale.conf and regenerate locale with locale-gen. It doesn't work after logout/login, but after 2 reboots it worked!
Thanks.

Offline

Board footer

Powered by FluxBB