1
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 LANG=en_US.UTF-8 LANGUAGE=en_US:en 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=
- 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 asaptitude
. - 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 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.
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 – 2015-02-26T17:51:40.327
@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 – 2015-08-18T09:27:25.023