You are not logged in.
Vim version:
12067.7147820cb-1
some envars:
LANG=pt_BR.UTF-8
LANGUAGE=en_US
LC_ALL=C
I have the set encoding=utf-8 and set fileencoding=utf-8 on .vimrc, and it works as expected, atleast until I close the file and open it again.
Here I'm editing a file and it's all ok:
And here I opened the file again:
Sometimes depending on the characters that I had typed in the file, and pressing move keys in vim will delete part of the text and enter in the insert mode.
Last edited by ltsdw (2020-10-06 01:00:28)
Offline
The file is utf-8 but your terminal (or at least vim) is not.
The reason would be "LC_ALL=C" which will set all locales to "C", ie. ascii.
In doubt:
localectl
locale
locale -a
Offline
The reason would be "LC_ALL=C" which will set all locales to "C", ie. ascii.
So, I've unsetted that, re-run locale-gen just to certify (rebooted the system), and still getting the same behavior.
In doubt:
localectl locale locale -a
$ localectl:
System Locale: LANG=pt_BR.UTF-8
LANGUAGE=en_US
VC Keymap: br-abnt2
X11 Layout: n/a
$ locale:
LANG=pt_BR.UTF-8
LC_CTYPE="pt_BR.UTF-8"
LC_NUMERIC="pt_BR.UTF-8"
LC_TIME="pt_BR.UTF-8"
LC_COLLATE="pt_BR.UTF-8"
LC_MONETARY="pt_BR.UTF-8"
LC_MESSAGES="pt_BR.UTF-8"
LC_PAPER="pt_BR.UTF-8"
LC_NAME="pt_BR.UTF-8"
LC_ADDRESS="pt_BR.UTF-8"
LC_TELEPHONE="pt_BR.UTF-8"
LC_MEASUREMENT="pt_BR.UTF-8"
LC_IDENTIFICATION="pt_BR.UTF-8"
LC_ALL=
$ locale -a:
C
ja_JP.utf8
POSIX
pt_BR
pt_BR.iso88591
pt_BR.utf8
Last edited by ltsdw (2020-07-07 21:04:50)
Offline
LANGUAGE=en_US
No en_US locale is installed and no other entry is listed but the entry does not match:
LANG=pt_BR.UTF-8
What is this trying to achieve?
Offline
LANGUAGE=en_US
No en_US locale is installed and no other entry is listed but the entry does not match:
LANG=pt_BR.UTF-8
What is this trying to achieve?
I just like my system/environment in english, as it's not my native language, I like to be exposed to the language as often as possible, and with that the rest is in pt_BR as I need write things here and there in portuguese (without it I wouldn't be able to type 'ç', '~' or see some characters).
Offline
Have you read https://wiki.archlinux.org/index.php/Locale ?
Offline
Have you read https://wiki.archlinux.org/index.php/Locale ?
Yes, when I first installed the system, back in there I wasn't able to type 'ç', '~' when uncommenting en_US.UTF-8 UTF-8 and setting LANG=en_US.UTF-8, and since then I've been using LANG=pt_BR.UTF-8. Maybe I misread something?
Offline
What does "LANGUAGE" do, what is it use for?
when uncommenting en_US.UTF-8 UTF-8
en_US.UTF-8 is not an available locale.
Offline
What does "LANGUAGE" do, what is it use for?
According to the wiki, 'Programs which use gettext for translations respect the LANGUAGE option in addition to the usual variables.', as that I can get manuals, and other things in english. As I said above, I like immersion as much as possible.
when uncommenting en_US.UTF-8 UTF-8
en_US.UTF-8 is not an available locale.
Sorry, indeed I dind't explained it right, should be uncommenting en_US.UTF-8 UTF-8 at /etc/locale.gen, to use LANG=en_US.UTF-8.
Last edited by ltsdw (2020-07-08 18:23:16)
Offline
And back in that time I discovered that wasn't needed the use of LANG=en_US.UTF-8 to get my entire environment in english, just LANGUAGE, and then I decided that was safe set LANG to pt_BR.UTF-8 (as I need this in pt_BR.UTF-8 to get the right behavior while typing or to get the right character displayed on terminal). Also according to the wiki the wiki for LANG: 'The locale set for this variable will be used for all the LC_* variables that are not explicitly set.', LANG will not apply for others LC_ that I did explicitly setted.
Last edited by ltsdw (2020-07-08 18:23:45)
Offline
You're getting the entire environment in C, not "english". en_US is not C and most importantly the latter is not UTF-8
vim itself does not seem to interpret the variable, but your VTE might
Sidenote: "second" does not mean what you probably think it means.
Offline
Programs that do not use gettext would use pt_BR.UTF-8 as specified by LANG, programs that respect LANGUAGE fail to use en_US as it is not available:
C
ja_JP.utf8
POSIX
pt_BR
pt_BR.iso88591
pt_BR.utf8
Offline
You're getting the entire environment in C, not "english". en_US is not C and most importantly the latter is not UTF-8
vim itself does not seem to interpret the variable, but your VTE might
Hmmmmm... ok, so what should be the approach as I already unssetted LC_ALL, and still not seeing the right behavior.
Sidenote: "second" does not mean what you probably think it means.
Really? HAHAHAHAH now I'm ashamed of myself Always thought that I could use that to mention/quote something that someone/something says. Damn you all false friends. I think I should been using 'according to'.
Noted, thank you.
Offline
Programs that do not use gettext would use pt_BR.UTF-8 as specified by LANG, programs that respect LANGUAGE fail to use en_US as it is not available:
C ja_JP.utf8 POSIX pt_BR pt_BR.iso88591 pt_BR.utf8
Right, will try uncommenting en_US then and re-running lolace-gen (even though everything was working right, except by the vim itself).
Offline
$ locale -a:
C
en_US
en_US.iso88591
en_US.utf8
ja_JP.utf8
POSIX
pt_BR
pt_BR.iso88591
pt_BR.utf8
Same behavior.
But I noted something, maybe it wasn't related with my envars at all. Maybe, it's my terminal... (st) when I open a new terminal or when go fullscreen, everything displays correct.
Offline
here with the problem:
https://i.paste.pics/95194da1827dcd3adf … edd406.png
and then:
https://i.paste.pics/fe069ca537660167ef … 11e4d3.png
Do we have a [spoiler][/spoiler] tag or something? Didn't saw nothing related over here https://bbs.archlinux.org/help.php#url
Last edited by ltsdw (2020-07-07 23:58:38)
Offline
Please replace the oversized images w/ thumbnails and/or links, remove the en_US and en_US.iso88591 locales and mention what VTE you use.
Offline
Please replace the oversized images w/ thumbnails and/or links, remove the en_US and en_US.iso88591 locales and mention what VTE you use.
I don't know how to use thumbnails, I'll go with links then. And VTE, st (suckless terminal).
Last edited by ltsdw (2020-07-08 18:24:57)
Offline
Well, installed nvim recently and everything is working just fine, so... closing.
Offline