Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm having trouble setting up PuTTY with Ubuntu.

I'm trying to get line characters to work in aptitude as well as 256-color support, but can only get one or the other.

  • Ubuntu Config
    • Using 64-bit Ubuntu
    • Terminal type xterm-256color or putty-256color gives 256-color, but incorrect line characters.
    • Terminal type linux gives proper lines in aptitude, but only 16 colors.
  • PuTTY Config
    • Using font with Unicode characters. (DejaVu Sans Mono)
    • Received Data is assumed to be in UTF-8.
    • Set to use Unicode line drawing code points.

Output from locale:

LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=
share|improve this question

1 Answer 1

up vote 16 down vote accepted

The problem is that PuTTY in UTF-8 mode ignores1 VT100 "Alternate character set" commands, and ncurses attempts to use the "graphical" character set for drawing the GUI. (The box drawing characters are in the same positions as klmqx would normally be.)

Export NCURSES_NO_UTF8_ACS=1 to your environment, it should fix the problem by telling ncurses to always use Unicode box drawing characters when a UTF-8 locale is selected.

1 There is a PuTTY wishlist entry for this, along with explanation why the current behavior is better.

share|improve this answer
    
That's interesting. I just always used Lucida Console because the line drawing always just worked in UTF-8 mode. Now I can use much better fonts. Thanks. :) –  Ariel May 3 '11 at 19:34
5  
I just want to point out that running through a program that converts the alternate character set to UTF-8 also fixes the problem. I found this from the link you provided. The best example program is screen. –  Swiss May 4 '11 at 6:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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