After updating to 2.1.0-canary.2, I get the following message in my shell when starting a new session:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LC_ALL = (unset),
LANG = "en_DE.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
This can't be reproduced in Terminal.app, and if I go back to 2.1.0-canary.1, the issue is gone.
It seems like #2913 could introduce this issue.
I am having the same problem. I think the only config that is different is that I am on macOS 10.13.5.
Can you execute locale command and attach the result?
Can you compare with Terminal.app output for the same command?
locale on Hyper:
> locale
LANG="en_DE.UTF-8"
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
locale on Terminal.app:
> locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
ok I think this is related to your os configuration. You've certainly set english language with germany as Region. Thus detected locale is en_DE and it doesn't exist.
Several workaround exists (in your case, something like sudo echo en_DE.UTF-8 en_US.UTF-8 >> /usr/share/locale/locale.alias to define en_DE as an alias of en_US) but I think that we must validate locale before setting it.
Thanks for your response. For now I added LC_ALL and LANG to my zshrc, instead of sudo-ing around.
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
But I agree, setting a non-configured locale shouldn't happen.
Fixed for me with the same thing that @timomeh has done.
I am also having a problem related to this. In my case I get the following error when trying to source activate conda-env
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "/Users/uname/anaconda3/lib/python3.6/site-packages/conda/cli/main.py", line 98, in main
return activator_main()
File "/Users/uname/anaconda3/lib/python3.6/site-packages/conda/activate.py", line 584, in main
print(activator.execute(), end='')
UnicodeEncodeError: 'ascii' codec can't encode character '\u279c' in position 152: ordinal not in range(128)
I am on MacOS 10.13.5, also using ZSH. The output of locale in hyper.app is
LANG="en_US.UTF-8"
LC_COLLATE="C"
LC_CTYPE="C"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
and in Terminal.app
LANG="en_US.UTF-8"
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=
I can also reproduce the error with Perl mentioned above.
@pseudocubic can you confirm that your error doesn't happen on Terminal.app and on stable Hyper?
Yes, I can confirm that both Terminal.app and stable Hyper (2.0.0) both work fine, and even up to 2.1.0-canary.1 works, its only 2.1.0-canary.2 that this has become a problem
I can confirm this bug too (https://github.com/zeit/hyper/pull/2913#issuecomment-447627297). IMO setting lang to EN and having a differrent locale is not an os misconfiguration. We should somehow validate locale to prevent invalid default computed values like en_IR.UTF-8
Should be hopefully fixed by https://github.com/sindresorhus/os-locale/pull/33
@pi0 thank you for this PR on the right place!
Most helpful comment
Thanks for your response. For now I added
LC_ALLandLANGto my zshrc, instead of sudo-ing around.But I agree, setting a non-configured locale shouldn't happen.