I have an Ubuntu 11.04 server on Amazon EC2 which cannot display TUI interfaces correctly, like on Midnight Commander or tree.I'm quite sure that this problem was not there when I set it up, and I suspect that it may have occurred since I did a apt-get dist-upgrade.How can I fix this?
TUI interfaces not displaying correctly
terminal;character encoding
The characters  in CP-1251 (an 8-bit character set that extends latin1) make up  when interpreted in UTF-8. Evidently, your locales are not set up properly: the remote system thinks it is displaying on an UTF-8 terminal (UTF-8 is the de facto standard encoding in the Unix world), but your terminal is displaying in CP-1251 (are you running a terminal emulator under Windows?). You must fix this discrepancy.My recommendation is to use a Unicode terminal. It's more capable, and Unicode (encoded in UTF-8) is the standard nowadays, outside legacy systems. Under Windows, I recommend mintty, or if you're combining a terminal emulator with ssh, PuTTY. Make sure to configure the terminal for Unicode (and use a font that has significant support for Unicode, which shouldn't be a issue as long as your Windows version is at least Windows XP).If you're stuck with a non-Unicode terminal, set the remote system to use latin1. Make sure that the en_US.iso88591 locale is generated (check with locale -a, and run sudo locale-gen en_US.iso88591 if it doesn't appear in the list). Then add export LC_CTYPE=en_US.iso88591 in ~/.profile.