PuTTY Line Characters not displaying properly in ZSH?

4

Can anyone give me some direction on what is wrong with Putty that is causing this? Note that PuTTY is set to an encoding of UTF-8, and the line characters are set to be handled with Unicode. Also, i've tried every combination i can think of.. spent hours on this and still no end in sight.. any help would be much appreciated.

Here is what putty looks like..

lq(lee@work:pts/5)qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(~)qk
mq(%) echo $TERM                                                                                                                             qj
xterm
lq(lee@work:pts/5)qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(~)qk
mq(%) echo $LANG                                                                                                                             qj
en_US.UTF-8
lq(lee@work:pts/5)qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq(~)qk
mq(%)                                                                                                                                        qj

And what really confuses me.. is here is what screen looks like.. (Note that screen was launched in the same zsh session shown above.)

┌─(lee@work:pts/4)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(~)─┐
└─(%) echo $TERM                                                                                                                             ─┘
screen
┌─(lee@work:pts/4)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(~)─┐
└─(%) echo $LANG                                                                                                                             ─┘
en_US.UTF-8
┌─(lee@work:pts/4)────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────(~)─┐
└─(%)                                                                                                                                        ─┘

Screen is obviously showing what i desire.. yet i cannot figure out why ZSH is not rendering properly.. Anyone have any ideas?

Lee Olayvar

Posted 2011-04-15T01:48:35.960

Reputation: 353

Answers

4

PuTTY doesn't support the VT100 line drawing characters in UTF-8 mode. See PuTTY wish utf8-plus-vt100. Other terminal emulators such as xterm or mintty do support this, however.

Screen is itself a terminal emulator that just happens to be running in another terminal, and I expect it maps the VT100 line drawing characters to the relevant Unicode codepoints. That also points to the solution for PuTTY: use the Unicode box drawing characters.

ak2

Posted 2011-04-15T01:48:35.960

Reputation: 3 387

Annoying bug. I used to change my terminfo entries to remove the vt100 line drawing ability so that ncurses apps would just use -, |, and + to draw lines instead to work around it. – Arrowmaster – 2011-04-16T11:10:02.000

Yup, as i was digging i ran into a Debian bug report with a temporary solution of doing what you described. Using the Unicode line characters directly. I was hoping for a more elegant solution, but this'll work just fine :) – None – 2011-04-16T15:01:23.043