Failed to set locale category LC_NUMERIC to en_RU

I’ve just updated my vim and now I have got the same error…

Got the same problem after upgrading neovim from 0.3.7 to 0.3.7_1.

I’m facing this too, but with en_BR

Quoting myself here.

I guess that’s dependent on the recent gettext update. https://savannah.gnu.org/forum/forum.php?forum_id=9430. You should probably use localedef to generate the locale you’re using then. Either way it’s not something Homebrew could fix, please file issues with Apple and/or gettext.

All the mentioned locale aren’t really standard and probably not present in /usr/share/locale/ which means gettext previously just ignored them.

1 Like

Currently I’ve just added export LC_ALL in my .bash_profile.

export LC_ALL=en_US.UTF-8
10 Likes

export LC_ALL doesn’t work for me, I got more warnings than before

+1: I got the same problem but with en_CH

2 Likes

You should use existing locale from /usr/share/locale/.

[pkropach@Pavels-MBP:~]$ ls -la /usr/share/locale | grep en_US
drwxr-xr-x    8 root  wheel   256 Sep 24  2018 en_US
drwxr-xr-x    8 root  wheel   256 Sep 24  2018 en_US.ISO8859-1
drwxr-xr-x    8 root  wheel   256 Sep 24  2018 en_US.ISO8859-15
drwxr-xr-x    8 root  wheel   256 Sep 24  2018 en_US.US-ASCII
drwxr-xr-x    8 root  wheel   256 Sep 24  2018 en_US.UTF-8
[pkropach@Pavels-MBP:~]$ locale
LANG=
LC_COLLATE="en_US.UTF-8"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
1 Like

@pkropachev. So I did the following:

  1. touch ~/.bash_profile and with the text editor I wrote export LC_ALL=en_US.UTF-8 in the created bash_profile file created. It didn’t change the error message

  2. then I cd /usr/share/locale/ and typed ls -la /usr/share/locale | grep en_CH and then ls -la /usr/share/locale | grep en_CH and then locale which gave me the following output:

LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=

The problem is still there, what shall I do?

1 Like

You should source dot file or restart terminal.

[pkropach@Pavels-MacBook-Pro:~]$ source ~/.bash_profile
OR
[pkropach@Pavels-MacBook-Pro:~]$ . ~/.bash_profile
2 Likes

Thank you for your answer @pkropachev. I tried both of your solution, but it unfortunately still doesn’t work

I just added this in my .bash_profile and there are no more errors.

export LC_ALL=en_US.UTF-8

16 Likes

GREAT!!! That solved the problem!!! many thanks @geoyws

@bjce
Strange that your previous actions didn’t solve problem.

@pkropachev: Indeed: re-reading your question, I don’t understand why it didn’t work previously. Thank you for your answer though

For some reason setting the locale by exporting it via .bash_profile didn’t seem to work, so I solved this by symlinking en_US.UTF-8 to en_DE.UTF-8

cd /usr/share/locale
sudo ln -sv  en_US.UTF-8  en_DE.UTF-8
1 Like

Solved my problem. Thanks.

Thank you! it solved my problem.

If you experience more WARNING like me, you could check the following:

First, “export LC_ALL=en_US.UTF-8” and “locale” to see if it works, then echo $SHELL, edit .bashrc or .zshrc(depending which shell you’re currently using), make sure to put “export LC_ALL=en_US.UTF-8” at the first line, restart your terminal.

3 Likes