I had a strange configuration on RHEL causing screen/cygwin/dialog/ncurses to interact badly with eachother.
My situation:
I have cygwin on my laptop installed. I am using it to connect to a RHEL 5 host , there I start screen and then use an ncurses application like dialog or midnight commander.
What happens: The system is completely unreadable and unusable.
The solution is so easy:
Redhat screwed up.
$ echo ${LANG}
LANG=en_US.UTF-8
$ locale -a|grep en_US
en_US
en_US.iso88591
en_US.iso885915
en_US.utf8
woops, my locale is NOT THERE!
Default $LANG on RHEL-5 = en_US.UTF-8
However, locale -a displays en_US.utf8
Luckily, the fix is easy.
in /etc/sysconfig.d/i18n , you can change the default locale and make it the existing en_US.utf8.
My terminal now works exactly as predicted and I am happily using mc/dialog and other ncurses apps again.. WHEW!
If someone can test this on a RHEL-6 host, then I know if i can file a bug report with RedHat! …
So, if you have “erratic” behaviour on ncurses apps, try checking your locale settings….