Fixing box drawing in Midnight Commander

Launching MC in rxvt showed all the box drawing characters replaced with strange looking accented characters… What?

Turns out none of the Windows fonts support box drawing characters (from what I’ve read, it seems that they don’t have the characters in the expected positions in the character table)…

The easiest solution is to tell MC to use non box drawing characters to draw boxes with the -a switch. The other solution is to get the Lucida ConsoleP Font. (307), and set rxvt to use it (as suggested by this guide).

How do you set the fonts? You could set them with command line switches, or use a .XResources file in your Cygwin home directory (base file from here)):

rxvt.font:             Lucida Console-14
rxvt.boldFont:         Lucida Console-14
rxvt.scrollBar:        True
rxvt.visualBell:       True
rxvt.loginShell:       True
rxvt.background:       Black
rxvt.foreground:       White
rxvt.saveLines:        3000
rxvt.cursorColor:      Green
rxvt.scrollBar_right:  True

If you want to use the box drawing font (you have to install it on the system first):

rxvt.font:             Lucida ConsoleP-14
rxvt.boldFont:         Lucida ConsoleP-14
rxvt.scrollBar:        True
rxvt.visualBell:       True
rxvt.loginShell:       True
rxvt.background:       Black
rxvt.foreground:       White
rxvt.saveLines:        3000
rxvt.cursorColor:      Green
rxvt.scrollBar_right:  True

If you use the standard DOS terminal for Cygwin, you may want to change the code page setting in the batch file to:

set CYGWIN=codepage:oem

One thought on “Fixing box drawing in Midnight Commander

  1. Pingback: Microbits » Fun with Portable Cygwin

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>