2
After setting the locale to 'en_US.utf8', all the characters(except a-z A-Z) are not showing correctly. For example, space will show up as '<0020>'
The locale is:
$ locale
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="en_US.UTF-8"
And if the locale is not set, the characters are shown correctly.
LC_LANG=
LC_CTYPE="C"
...
Also, bash won't have this problem.
I set my locale with
export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8
and it works ok still for me. Problem probably lies elsewhere.. Are u using iterm? – Karthik T – 2015-09-09T07:24:45.327@KarthikT yes, I use iterm2, and this problem also occurs on terminal. – LotAbout – 2015-09-09T08:56:42.337
Even works for me on system
zsh
v 4.3.11.. Not sure. – Karthik T – 2015-09-09T10:03:35.7271Please check if your zsh is compiled with multibyte support. Using a clean shell (
zsh -f
) issue[[ -o multibyte ]] && echo on
and check if it prints on. – mpy – 2015-09-09T16:29:10.547@mpy Really sorry for late reply, the result on my local machine shows "on", any ideas? – LotAbout – 2015-09-12T00:50:23.833