Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] unsupported locale setting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Troopo
Guru
Guru


Joined: 14 Jun 2015
Posts: 310

PostPosted: Sun Jun 20, 2021 12:08 am    Post subject: [SOLVED] unsupported locale setting Reply with quote

Hi,

I have the same issue as in the title or this thread:
https://forums.gentoo.org/viewtopic-t-1072508-start-0.html

No idea what is wrong, i've tried to follow the advice there and nothing worked

Here are my configs:

Code:

/etc/env.d/02locale
# Configuration file for eselect
# This file has been automatically generated.
LANG="en_US"


Code:

locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US
LC_CTYPE=C.UTF-8
LC_NUMERIC="en_US"
LC_TIME=en_IL.US-ASCII
LC_COLLATE="en_US"
LC_MONETARY="en_US"
LC_MESSAGES="en_US"
LC_PAPER="en_US"
LC_NAME="en_US"
LC_ADDRESS="en_US"
LC_TELEPHONE="en_US"
LC_MEASUREMENT="en_US"
LC_IDENTIFICATION="en_US"
LC_ALL=


Code:

locale -a
C
C.utf8
en_US
en_US.iso88591
en_US.utf8
POSIX


Code:

/etc/locale.gen
en_US.UTF-8 UTF-8
en_US ISO-8859-1


Code:

eselect locale list
Available targets for the LANG variable:
  [1]   C
  [2]   C.utf8
  [3]   en_US *
  [4]   en_US.iso88591
  [5]   en_US.utf8
  [6]   POSIX
  [ ]   (free form)


Last edited by Troopo on Thu Jun 24, 2021 6:24 am; edited 1 time in total
Back to top
View user's profile Send private message
Troopo
Guru
Guru


Joined: 14 Jun 2015
Posts: 310

PostPosted: Tue Jun 22, 2021 7:43 pm    Post subject: Reply with quote

Bump
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue Jun 22, 2021 9:00 pm    Post subject: Reply with quote

Switch to en_US.utf8...
Code:
eselect locale set 5
Back to top
View user's profile Send private message
Troopo
Guru
Guru


Joined: 14 Jun 2015
Posts: 310

PostPosted: Tue Jun 22, 2021 10:26 pm    Post subject: Reply with quote

mike155 wrote:
Switch to en_US.utf8...
Code:
eselect locale set 5


Didn't work, tried all other options as well, something else is wrong.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Tue Jun 22, 2021 11:03 pm    Post subject: Reply with quote

Quote:
Didn't work, tried all other options as well, something else is wrong.

Well, step by step... Step by step...

en_US.utf8 is the correct locale that should be set with "eselect locale".

Next step: "LC_TIME=en_IL.US-ASCII." Where does this come from? Where do you set it and why do you set it?

Do you use openrc or systemd? If you use systemd: please post the output of "localectl"?
Back to top
View user's profile Send private message
Troopo
Guru
Guru


Joined: 14 Jun 2015
Posts: 310

PostPosted: Wed Jun 23, 2021 7:38 am    Post subject: Reply with quote

mike155 wrote:
Quote:
Didn't work, tried all other options as well, something else is wrong.

Well, step by step... Step by step...

en_US.utf8 is the correct locale that should be set with "eselect locale".

Next step: "LC_TIME=en_IL.US-ASCII." Where does this come from? Where do you set it and why do you set it?

Do you use openrc or systemd? If you use systemd: please post the output of "localectl"?


Yeah, step by step

Why do you say utf8 is the correct one?

I'm on a new system with openrc i just followed the handbook part about it, no idea where LC_TIME is coming from.

https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#Configure_locales
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Wed Jun 23, 2021 11:17 am    Post subject: Reply with quote

Quote:
I'm on a new system with openrc i just followed the handbook part about it, no idea where LC_TIME is coming from.

Ah, okay. I thought it happened on an existing machine.

Locales work on my machine, but I temporarily switched to "LC_TIME=en_IL.US-ASCII". After that, i got the error message you posted. So that seems to be the culprit.

You could try to change LC_TIME manually:
Code:
export LC_TIME="en_US.utf8"
locale

The error message will be gone, right?

Now let's try to find out where "en_IL.US-ASCII" comes from:
Code:
cd /etc
grep -ir "en_IL.US-ASCII" .
cd ~
grep -ir "en_IL.US-ASCII" .

Do you get any results?
Back to top
View user's profile Send private message
Troopo
Guru
Guru


Joined: 14 Jun 2015
Posts: 310

PostPosted: Wed Jun 23, 2021 11:53 am    Post subject: Reply with quote

mike155 wrote:
Quote:
I'm on a new system with openrc i just followed the handbook part about it, no idea where LC_TIME is coming from.

Ah, okay. I thought it happened on an existing machine.

Locales work on my machine, but I temporarily switched to "LC_TIME=en_IL.US-ASCII". After that, i got the error message you posted. So that seems to be the culprit.

You could try to change LC_TIME manually:
Code:
export LC_TIME="en_US.utf8"
locale

The error message will be gone, right?


Yep it's gone now

Quote:
Now let's try to find out where "en_IL.US-ASCII" comes from:
Code:
cd /etc
grep -ir "en_IL.US-ASCII" .
cd ~
grep -ir "en_IL.US-ASCII" .

Do you get any results?


Actually yes
Code:

./.config/plasma-localerc:LC_TIME=en_IL.US-ASCII


I forgot this but i've overwritten the time so it will show a 24h clock instead of a 12 hour one.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Wed Jun 23, 2021 3:08 pm    Post subject: Reply with quote

You could add the line below
Code:
en_IL UTF-8

to /etc/locale.gen. Then run 'locale-gen'. After that, 'locale -a' will hopefully show
Code:
...
en_IL
en_IL.utf8

After that, you can set
Code:
LC_TIME=en_IL.utf8

in .config/plasma-localerc.

Keep in mind that all values shown in the output of 'locale' must also be visible in the output of 'locale -a'.
Back to top
View user's profile Send private message
Troopo
Guru
Guru


Joined: 14 Jun 2015
Posts: 310

PostPosted: Thu Jun 24, 2021 6:24 am    Post subject: Reply with quote

mike155 wrote:
You could add the line below
Code:
en_IL UTF-8

to /etc/locale.gen. Then run 'locale-gen'. After that, 'locale -a' will hopefully show
Code:
...
en_IL
en_IL.utf8

After that, you can set
Code:
LC_TIME=en_IL.utf8

in .config/plasma-localerc.

Keep in mind that all values shown in the output of 'locale' must also be visible in the output of 'locale -a'.


Thanks mike! that seemed to fix it.

I should also add that i've set it to utf8 using eselect but on boot it is set to C but it seems that error is only caused by LC+TIME which is overridden by plasma so it's still ok
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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