You are not logged in.
I was trying to use googler for searching google. What happened was
$ googler recursion
1 Recursion - Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Recursion
[ERROR] 'ascii' codec can't encode character '\xa0' in position 165: ordinal not in range(128)
So I googled the old way and found this thread https://github.com/jarun/googler/issues/131.
According to this my the output of running locale should look like
$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=en_IN.UTF-8
LC_TIME=en_IN.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=en_IN.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=en_IN.UTF-8
LC_NAME=en_IN.UTF-8
LC_ADDRESS=en_IN.UTF-8
LC_TELEPHONE=en_IN.UTF-8
LC_MEASUREMENT=en_IN.UTF-8
LC_IDENTIFICATION=en_IN.UTF-8
LC_ALL=
But when I run locale, I get
$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
I have uncommented the line #en_US.UTF-8 UTF-8 in /etc/locale.gen, and I have run
# locale-gen
and afterwards set /etc/locale.conf to be
$ cat /etc/locale.conf
LANG=en_US.UTF-8
If I on the other hand log into my root user and run locale, I get
# 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=
and googler seems to work, on my root user.
I guess I have overlooked something or I am just being plain stupid, but I can't really figure out why the locale isn't set properly on my user.
SOLUTION: The problem seemed to be that I'm using fish. I simply inserted the line
set -x LC_ALL en_US.UTF-8
into my ~/.config/fish/config.fish
Last edited by spegesilden (2016-09-29 07:39:57)
Offline
Maybe locale for your user is overridden ?
Look for ~/.config/locale.conf or $XDG_CONFIG_HOME/locale.conf .
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline
If you're using an desktop environment, it could be overriding your global locale settings. If so, check your desktop's localization settings.
Offline
Are you using fish?
Yes I am using fish. That seems to do the trick. Thanks a lot.
Offline