You are not logged in.

#1 2021-05-25 21:50:34

Kulpo
Member
Registered: 2021-05-25
Posts: 6

[SOLVED]locale settings don't work before starting X nor in Vim

I tried to make Vim my main text editor, then I realized that i can't write Polish characters like: ą, ę, etc. It's quite strange because those characters work in every other place. During debugging process I also noticed that I can't use those characters before starting X server.
Some outputs:

➜  ~ locale
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=
➜  ~ locale -a
C
en_US.utf8
pl_PL.utf8
POSIX
➜  ~ locale
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=
➜  ~ cat /etc/locale.gen | grep '^[^#]'

en_US.UTF-8 UTF-8
pl_PL.UTF-8 UTF-8

Last edited by Kulpo (2021-05-26 09:18:46)

Offline

#2 2021-05-25 22:32:13

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED]locale settings don't work before starting X nor in Vim

What's in /etc/locale.conf?

Offline

#3 2021-05-25 22:45:40

Kulpo
Member
Registered: 2021-05-25
Posts: 6

Re: [SOLVED]locale settings don't work before starting X nor in Vim

➜  ~ cat /etc/locale.conf
LANG=en_US.UTF-8

I tried

localectl set-locale LANG=pl_PL.UTF-8

but it didn't help.

Last edited by Kulpo (2021-05-25 22:47:42)

Offline

#4 2021-05-25 22:48:31

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,729

Re: [SOLVED]locale settings don't work before starting X nor in Vim

So everything lines up with what you have set in locale.conf, what's the problem?

Offline

#5 2021-05-25 23:06:48

Kulpo
Member
Registered: 2021-05-25
Posts: 6

Re: [SOLVED]locale settings don't work before starting X nor in Vim

I can't use Polish characters before starting X server nor in vim. I tried once again switching back /etc/locale.conf to LANG=pl_PL.UTF-8.

Offline

#6 2021-05-26 05:33:54

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,462

Re: [SOLVED]locale settings don't work before starting X nor in Vim

I can't use Polish characters

I assume you mean you can't type them on your keyboard rather than they don't appear on screen in an existing text?

cat /etc/vconsole.conf

Try "loadkeys pl" - there seem to be 5(!) polish keyboard layouts - pl and pl[1-4] so you might need another variant.

Online

#7 2021-05-26 07:12:03

Kulpo
Member
Registered: 2021-05-25
Posts: 6

Re: [SOLVED]locale settings don't work before starting X nor in Vim

I assume you mean you can't type them on your keyboard rather than they don't appear on screen in an existing text?

They don't appear on screen, e.g. when I tried to cat files with those characters instead of them I received gray squares.

Try "loadkeys pl" - there seem to be 5(!) polish keyboard layouts - pl and pl[1-4] so you might need another variant.

Just tried, it didn't help.

Offline

#8 2021-05-26 07:44:10

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,462

Re: [SOLVED]locale settings don't work before starting X nor in Vim

Online

#9 2021-05-26 08:18:24

Kulpo
Member
Registered: 2021-05-25
Posts: 6

Re: [SOLVED]locale settings don't work before starting X nor in Vim

Thanks, that resolved problem with console characters. Maybe it will be useful for someone, I had to change /etc/vconsole.conf to:

KEYMAP=pl
FONT=Lat2-Terminus16.psfu.gz
FONT_MAP=8859-2

It doesn't resolve problem wit vim tho, still can't use all characters, instead of them I have some other strange letters. I'm not sure if it's because of arch or rather some vim issue.

Offline

#10 2021-05-26 09:06:39

Kulpo
Member
Registered: 2021-05-25
Posts: 6

Re: [SOLVED]locale settings don't work before starting X nor in Vim

@Seth thank you once again for your tip. I manage to to solve my problems by changing console font and terminal font.

Offline

Board footer

Powered by FluxBB