I installed the latest master of Neovim. However, I have some UTF-8 characters in my .vimrc, and also when I open a file with UTF-8 characters, Neovim throws an error for each UTF-8 character it finds (each error message is different, because they appear in different contexts, so I can't pull out a specific one). I have a :set encoding=utf-8
in my .vimrc, and Neovim was working fine before, there was just some change meanwhile that trips it up now.
:set encoding=utf-8
That's default, so shouldn't be needed (unless your locale set by $LANG
isn't UTF-8). I triggered the following error by setting $LANG
to en_US.ISO-8859-1
and launching nvim:
Error detected while processing function gitgutter#highlight#define_signs..gitgutter#highlight#define_sign_text:
line 4:
E239: Invalid sign text: @�
Press ENTER or type command to continue
Are your error messages similar to that? And can you verify that encoding
is indeed being set to utf-8
by running :set encoding
in a UTF-8 encoded file?
Yes, I'm also using vim-gitgutter, and one of the errors is exactly this one.
It seems the following lines somehow dissapeared from my .bash_profile
, and when I add them back, Neovim works properly:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
Neovim worked before with UTF-8 without these settings, but that was probably an unintended "feature", which got rightfully removed.
@janko-m .bash_profile
is actually not a good place for these settings. I have $LANG
($LC_ALL
is not defined) in /etc/env.d/99locale (AFAIR file was created when system was installed) which specifies data for automatically generated /etc/profile.env which is sourced by /etc/profile. Pretty sure your distribution has something like this to specify $LANG system-wide. And I think without this setting system-wide if your locale was any but English you would not get correct locale in GUI applications.
Most helpful comment
Yes, I'm also using vim-gitgutter, and one of the errors is exactly this one.
It seems the following lines somehow dissapeared from my
.bash_profile
, and when I add them back, Neovim works properly:Neovim worked before with UTF-8 without these settings, but that was probably an unintended "feature", which got rightfully removed.