I just upgraded to Debian 8 with a fresh install and my terminal prompt (prompt adam2 8bit with ZSH) no longer displays some characters correctly: Missing unicode characters

I've checked the terminal encoding (set to Unicode UTF-8) and the $TERM environment variable (xterm-256color) as well as multiple terminal emulators and fonts, but nothing seems to give me actual unicode characters. Moreover, this happens with a completely bare .zshrc after having issued

    $ autoload -Uz promptinit
    $ promptinit
    $ prompt adam2 8bit

to the terminal. My locale reads


closed as unclear what you're asking by Gilles, X Tian, roaima, cuonglm, G-Man Jun 25 '15 at 2:30

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Post enough of your configuration (.zshrc and any other relevant file) to reproduce the problem — basically we need to see your prompt setting. Also tell us the output of locale. – Gilles Jun 24 '15 at 22:39
  • BTW, $TERM has no effect on what the terminal emulator can do — see Why xterm displays 256 colors (not xterm-256color)? – G-Man Jun 25 '15 at 2:35
  • Does it depend on the font you use in the terminal emulator? – jofel Jun 26 '15 at 11:39
  • @jofel Not as far as I can tell. All of the fonts I've checked do the same thing (and the font I'm using, DejaVu mono, worked previously). – Connor Glosser Jun 26 '15 at 13:37

This is most probably a problem with your $PS1 variable. The $PS1 variable is defined in your zshrc file. This file is located in /etc/zshrc The $PS1 variable stores the encoded (ASCII I believe) information to produce your prompt.
The first thing you want to do is see what your $PS1 is currently. To do this type echo $PS1 in your terminal. The standard prompt for Debian 8 ZSH is %m%#, which equates to hostname% or whatever your hostname happens to be(my prompt is localhost%). Most likely, the reason for your odd terminal prompt is a messed up $PS1 variable, so to change it back to the default Debian 8 ZSH prompt type PS1="%m%#" in your terminal... keep in mind that this is temporary and your prompt will be reset every time you exit the terminal. To make this change permanent open your /etc/zshrc file and append
to the file. Type exit to close the terminal, and then open it up again. The new, fixed terminal prompt should be displayed.

On a side note

These instructions are for ZSH, not bash! The default prompt for bash in Debian 8 is \u@\H: \w $ which equates to username@hostname: ~ $ (If I was in the /bin directory, my prompt would look like bradleysadowsky@localhost: /bin $). The characters in a ZSH prompt are very different from the characters in the bash prompt. Bash has characters ZSH does not and vice versa. Another key difference is (mostly) in bash, the special $PS1 characters start with a backslash(\), whereas in ZSH (mostly), the special $PS1 characters start with a percent symbol(%) For a good list of the more useful ZSH escape characters go to this webpage. For a comprehensive guide to the $PS1 variable in bash and some escape characters for bash, go to this webpage.


To set up your own prompt just put those escape characters together in a way you like, and edit your /etc/zshrc adding your prompt to it. A good prompt that is useful and beautiful for ZSH is [%n@%m] %~> which is equivalent to [username@hostname] ~>, so for me (if I was in /bin) [bradleysadowsky@localhost] /bin>.

  • 2
    I don't understand how this answer is supposed to relate to the question. It appears to just be miscellaneous information about customising your prompt that doesn't have much to do with solving the OP's problem. – Chris Down Jun 24 '15 at 15:38
  • I actually don't "manually" set a PS1 variable anywhere; ZSH comes with a prompt command to view/set/customize a number of defaults. prompt adam2 works fine for me, but prompt adam2 8bit (with the box-drawing characters) gives the glyph-not-found question marks. – Connor Glosser Jun 24 '15 at 15:38
  • @ Connor Glosser: I believe the solution (I am not an expert at ZSH, although something like this has worked for me in the past) is to simply run prompt adam2 8bit and then echo $PS1... set that to your PS1 manually, (to identify if this is an error with ZSH or and error with the prompt command), and if it works, then great, if not, then try looking for errors within that particular set of escape characters... Hopefully this will fix it... – Interesting... Jun 24 '15 at 15:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.