11
3
I've had a terrible time getting zsh to play nicely with Debian Jessie, and I've come to the conclusion that my issues all stem from my system's locale. Running locale
, I see
LANG=en_US.utf8
LANGUAGE=
LC_CTYPE="en_US.utf8"
LC_NUMERIC="en_US.utf8"
LC_TIME="en_US.utf8"
LC_COLLATE="en_US.utf8"
LC_MONETARY="en_US.utf8"
LC_MESSAGES="en_US.utf8"
LC_PAPER="en_US.utf8"
LC_NAME="en_US.utf8"
LC_ADDRESS="en_US.utf8"
LC_TELEPHONE="en_US.utf8"
LC_MEASUREMENT="en_US.utf8"
LC_IDENTIFICATION="en_US.utf8"
LC_ALL=
however /etc/default/locale
contains LANG=en_US.UTF-8
as does /etc/environment
, and my /etc/locale.gen
file only has en_US.UTF-8 UTF-8
uncommented.
- Why does
locale
report something (subtly) different than seemingly every other option on my system, and - How do I configure (fix) things to give "en_US.UTF-8" for every LC option when I run
locale
?
Ahh, ok! Thanks! That illuminates things a little more for me. The problem that started this was an issue with zsh not properly rendering box-drawing characters; I just see a massive string of � replacement characters instead. Running
locale -a
only shows the lowercase variants, even after explicitly re-generating everything. The terminal emulator has the settings I would expect (i.e., en_US.UTF-8), and the output of printf shows me one little heart. – Connor Glosser – 2015-11-11T17:11:38.657That rather sounds like the source of these box-drawing characters is not actually UTF-8-encoded (perhaps your ~/.zshrc was saved in cp437?) Test the terminal emulator directly using
– user1686 – 2015-11-11T17:17:32.633printf '┌┘'
andprintf '\xe2\x94\x8c\xe2\x94\x98\n'
, or perhapscat
a demo file.I tried removing my ~/.zshrc and setting the appropriate options (
prompt adam2 8bit
) from the prompt directly so as to avoid any issues with the encoding of a settings file, but I still have the same issue. Which is particularly odd, becausecat
ting the demo file rendered perfectly---even the box-drawing characters at the end of the file! – Connor Glosser – 2015-11-11T17:30:59.840