Connecting to any debian installation via PuTTY results in a very strange situation: I can have correct display of line drawing, but not for all programs.

In particular Midnight Commander and aptitude seem to belong to opposite camps: If one works the other does not.

Currently I have linux set to use utf8 (LANG=en_US.UTF-8) and PuTTY likewise (Window->Translation->{Remote character set: UTF8; Use Unicode line drawing}); in this situation mc works as expected and aptitude displays "lqqqk".
if I reverse settings in PuTTY (wihout changing anything in linux) (Window->Translation->{Remote character set: ISO-8859-15; Use Unicode line drawing}); this time aptitude shows as it should and mc displays "ââ€â"; using other "Handling of line drawing characters" breaks mc and aptitude.

Other programs (e.g.: kernel menuconfig) seem to follow aptitude behavior.

What's going on "under the hood"?
How do I fix this (if at all possible)?

UPDATE: I have been living with this problem (and NO solution to be found, I am aware of many other answers, but they so address only one half of the problem: mc). As stated above I am able to make mc work correctly and I thought I was able to make aptitude/kconfig work correctly... only I need two different settings for them.

To recap:

  • I have a plain, default debian server (no GUI) install (currently jessie, but this holds true for all releases)`.
  • Locale is pretty standard:

    $ locale
    • I am using either the standard "xterm" setting or "putty" in Connection->Data->{Terminal-type string}; it makes no difference.
    • Certain programs work, others not; if I fix the "not working" ones I contextually break the "working" ones.
    • The "fix" consists in switching PuTTY Window->Translation->{Remote character set} from "UTF8" to "ISO-8859-15" and vice versa.
    • Extreme case is aptitude which, I discovered, can't be fixed because it seems to use two different standards: if menu and scrollbar are displayed right then pop-ups are wrong, and vice-versa.
    • Kernel configuration (make menuconfig) shows the same (wrong) behavior as aptitude.
    • I include screenshots to explicate better (nothing is changed server-side).

This was taken from KiTTY with UTF8 setting; note scrollbar is displaying correctly (and also menu (F10) display ok, I did not feel like adding other images, but I can provide, if needed). This is with UTF8

This was taken from KiTTY with ISO-8859-15 setting; note scrollbar is "wrong", but pop-up is correct (in this case also menu are garbled). Notice also the "kind" of mis-translation is different. This is with ISO-8859-15

Please Note: the question is not (and never was) "How to make mc display line-drawing chars", but "How to have mc and aptitude/kconfig working in the same environment".

  • Googling for "midnight commander unicode linedrawing" gave me a lot of usefull results. It appears that serverside and clientside needs to be aware of the same codepage... – agtoever Feb 26 '15 at 17:51
  • @agtoever I am aware of those results and tried many of their "solutions", but they address only half of the problem. (sorry for the very late answer, but "real life" caught on me). – ZioByte Aug 18 '15 at 9:27

Browse other questions tagged or ask your own question.